1. Bill Garrison
  2. xar

Commits

Bill Garrison  committed 976271c

Fixed clang warnings about use of variable assigned within conditional.

  • Participants
  • Parent commits aeb4a1f
  • Branches default

Comments (0)

Files changed (2)

File xar/lib/util.c

View file
  • Ignore whitespace
 	if (strlen(path) == 0 || path[0] == '/')
 		return 0;
 	
-	while (component = xar_path_nextcomponent(&path_walker)) {
+	while ((component = xar_path_nextcomponent(&path_walker))) {
 		
 		if (strlen(component) == 0 || strcmp(component, ".") == 0) { // Since // is legal, and '.' is legal it's possible to have empty path elements. Ignore them
 			free(component);

File xarsig/xar-sig.c

View file
  • Ignore whitespace
 			stack_push(s_new, (void *)last_added);
 			stack_push(s_old, (void *)last_copied);
 		}
-	} while (f = xar_file_next(iter));
+	} while ((f = xar_file_next(iter)));
 		
 	loopIter = xar_iter_new();
 	for (current_xar_file = xar_file_first(new_xar, loopIter); current_xar_file; current_xar_file = xar_file_next(loopIter))