Explorar o código

ncd: NCDBuildProgram: fix unused variable warning

ambrop7 %!s(int64=13) %!d(string=hai) anos
pai
achega
2d2be38d9f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      ncd/NCDBuildProgram.c

+ 1 - 1
ncd/NCDBuildProgram.c

@@ -117,7 +117,7 @@ static int guard_exists (struct guard *top_guard, const char *id_data, size_t id
 static char * make_dir_path (const char *file_path)
 {
     int found_slash = 0;
-    size_t last_slash;
+    size_t last_slash = 0; // initialize to remove warning
     
     for (size_t i = 0; file_path[i]; i++) {
         if (file_path[i] == '/') {