Ticket #3435: mc-cleanup-clang-warnings-06.patch
File mc-cleanup-clang-warnings-06.patch, 1.8 KB (added by and, 10 years ago) |
---|
-
src/vfs/smbfs/helpers/lib/util.c
fix clang 3.6 compiler warnings patch 01: -Wundef patch 02: -Wunused-function patch 03: -Wnon-literal-null-conversion patch 04: -Wmissing-field-initializers patch 05: -Wabsolute-value patch 06: -Wtautological-pointer-compare patch 07: -Wformat lib/util.c:345:34: warning: comparison of array 'global_scope' not equal to a null pointer is always true [-Wtautological-pointer-compare] libsmb/namequery.c:548:9: warning: comparison of array 'name_resolve_list' equal to a null pointer is always false [-Wtautological-pointer-compare] libsmb/nmblib.c:78:36: warning: comparison of array 'res->rdata' equal to a null pointer is always false [-Wtautological-pointer-compare] Signed-off-by: Andreas Mohr <and@gmx.li>
a b 342 342 p[0] = '\0'; 343 343 344 344 /* Add the scope string. */ 345 for (i = 0, len = 0; NULL != global_scope; i++, len++)345 for (i = 0, len = 0;; i++, len++) 346 346 { 347 347 switch (global_scope[i]) 348 348 { -
src/vfs/smbfs/helpers/libsmb/namequery.c
a b 545 545 } 546 546 547 547 pstrcpy (name_resolve_list, lp_name_resolve_order ()); 548 if (name_resolve_list == NULL|| *name_resolve_list == '\0')548 if (name_resolve_list[0] == '\0' || *name_resolve_list == '\0') 549 549 pstrcpy (name_resolve_list, "host"); 550 550 ptr = name_resolve_list; 551 551 -
src/vfs/smbfs/helpers/libsmb/nmblib.c
a b 75 75 DEBUGADD (4, (" %s: nmb_name=%s rr_type=%d rr_class=%d ttl=%d\n", 76 76 hdr, nmb_namestr (&res->rr_name), res->rr_type, res->rr_class, res->ttl)); 77 77 78 if (res->rdlength == 0 || res->rdata == NULL)78 if (res->rdlength == 0 || res->rdata[0] == '\0') 79 79 return; 80 80 81 81 for (i = 0; i < res->rdlength; i += 16)