From: Bruce Cran <bruce@cran.org.uk>
To: "fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Warnings from gcc 4.9 (on FreeBSD)
Date: Fri, 08 Nov 2013 13:11:28 +0000 [thread overview]
Message-ID: <527CE300.8010300@cran.org.uk> (raw)
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
next reply other threads:[~2013-11-08 13:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 13:11 Bruce Cran [this message]
2013-11-08 17:56 ` Warnings from gcc 4.9 (on FreeBSD) Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=527CE300.8010300@cran.org.uk \
--to=bruce@cran.org.uk \
--cc=fio@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.