소스 검색

ncd: NCDBuildProgram: fix unused variable warning

ambrop7 13 년 전
부모
커밋
2d2be38d9f
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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] == '/') {