The variable user in struct iscsi_url is a character array, not a pointer. Therefore its address will never be NULL. When libscsi is built using clang instead of gcc, those errors are reported: iscsi-perf.c:256:17: error: comparison of array 'iscsi_url->user' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare] iscsi-dd.c:272:17: error: comparison of array 'iscsi_url->user' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare] iscsi-dd.c:331:17: error: comparison of array 'iscsi_url->user' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare] ld_iscsi.c:99:18: error: comparison of array 'iscsi_url->user' not equal to a null pointer is always true [-Werror,-Wtautological-pointer-compare] Fix those errors and also similar code patterns in aros/iscsi-ls.c and test-tool/iscsi-support.c. Signed-off-by: Stefan Weil <sw@weilnetz.de>
12 KiB
12 KiB