Преглед на файлове

Fix return-type gcc warning

find_dl_schedule_and_len caused gcc to spit up with -Werror.

Signed-off-by: Sharif Olorin <sio@tesser.org>
Sharif Olorin преди 9 години
родител
ревизия
90e07ab338
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      src/or/directory.c

+ 3 - 0
src/or/directory.c

@@ -3479,6 +3479,9 @@ find_dl_schedule_and_len(download_status_t *dls, int server)
     default:
     default:
       tor_assert(0);
       tor_assert(0);
   }
   }
+
+  /* Impossible, but gcc will fail with -Werror without a `return`. */
+  return NULL;
 }
 }
 
 
 /** Called when an attempt to download <b>dls</b> has failed with HTTP status
 /** Called when an attempt to download <b>dls</b> has failed with HTTP status