Building using gcc 4.9 (on FreeBSD 11-CURRENT) generates a few warnings
about undefined behaviour:
CC cconv.o
In file included from thread_options.h:5:0,
from cconv.c:3:
cconv.c: In function 'convert_thread_options_to_cpu':
os/os.h:197:16: warning: iteration 2u invokes undefined behavior
[-Waggressive-loop-optimizations]
__le32_to_cpu(*__val); \
^
os/os.h:176:28: note: in definition of macro '__le32_to_cpu'
#define __le32_to_cpu(x) (x)
^
cconv.c:78:17: note: in expansion of macro 'le32_to_cpu'
o->rwmix[i] = le32_to_cpu(top->rwmix[i]);
^
cconv.c:63:2: note: containing loop
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
^
In file included from thread_options.h:5:0,
from cconv.c:3:
cconv.c: In function 'convert_thread_options_to_net':
os/os.h:209:16: warning: iteration 2u invokes undefined behavior
[-Waggressive-loop-optimizations]
__cpu_to_le32(*__val); \
^
os/os.h:179:28: note: in definition of macro '__cpu_to_le32'
#define __cpu_to_le32(x) (x)
^
cconv.c:372:19: note: in expansion of macro 'cpu_to_le32'
top->rwmix[i] = cpu_to_le32(o->rwmix[i]);
^
cconv.c:352:2: note: containing loop
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
^
In file included from thread_options.h:5:0,
from cconv.c:3:
cconv.c: In function 'fio_test_cconv':
os/os.h:209:16: warning: iteration 2u invokes undefined behavior
[-Waggressive-loop-optimizations]
__cpu_to_le32(*__val); \
^
os/os.h:179:28: note: in definition of macro '__cpu_to_le32'
#define __cpu_to_le32(x) (x)
^
cconv.c:372:19: note: in expansion of macro 'cpu_to_le32'
top->rwmix[i] = cpu_to_le32(o->rwmix[i]);
^
cconv.c:352:2: note: containing loop
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
^
In file included from thread_options.h:5:0,
from cconv.c:3:
os/os.h:197:16: warning: iteration 2u invokes undefined behavior
[-Waggressive-loop-optimizations]
__le32_to_cpu(*__val); \
^
os/os.h:176:28: note: in definition of macro '__le32_to_cpu'
#define __le32_to_cpu(x) (x)
^
cconv.c:78:17: note: in expansion of macro 'le32_to_cpu'
o->rwmix[i] = le32_to_cpu(top->rwmix[i]);
^
cconv.c:63:2: note: containing loop
for (i = 0; i < DDIR_RWDIR_CNT; i++) {
^
--
Bruce Cran
--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html