Instead of adding __attribute__((unused)) to unused arguments, add the
-Wno-unused-parameter compiler flag.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
If with int defintion, this statement:
num_blocks = client->num_blocks - client->pos;
May not get the exact value we want.
Signed-off-by: optimistyzy <optimistyzy@gmail.com>
Add ULL to all the large integer literals. Without this they can be
treated as being signed by the compiler (at least on 32 bit machines)
leading to underflow problems and strange output when calculating the
elapsed time.
7c6a3e4a0b wound up always forcing the
usage of gettimeofday (even when the more accurate CLOCK_MONOTONIC was
available) because the define to indicate its availability is in
config.h which wasn't included.
Fix this by including config.h, correct the misnamed variable in the
CLOCK_MONOTONIC branch and rename VERSION to PERF_VERSION to avoid the
naming conflict.
this adds a switch to define max_reconnects instead of just aborting
after a NOP timeout. It is now also possible to force an exit
if CTRL-C is pressed twice.
Signed-off-by: Peter Lieven <pl@kamp.de>
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>
Compiling with clang gives a format warning like
iscsi-perf.c:98:53: error: format specifies type 'unsigned long' but the
argument has type 'uint64_t' (aka 'unsigned long long')
[-Werror,-Wformat]
so replace %lu with %llu where appropriate.
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>