[PATCH] usr/Makefile: Turn off build warning in new gcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With gcc 4.4.3 (Fedora 12) I get:

iscsi/iscsid.c: In function 'iscsi_rx_handler':
iscsi/iscsid.c:1986: warning: dereferencing type-punned pointer will break strict-aliasing rules
iscsi/iscsid.c:1987: warning: dereferencing type-punned pointer will break strict-aliasing rules
iscsi/iscsid.c:2022: warning: dereferencing type-punned pointer will break strict-aliasing rules
iscsi/iscsid.c:2023: warning: dereferencing type-punned pointer will break strict-aliasing rules
iscsi/iscsid.c: In function 'iscsi_tx_handler':
iscsi/iscsid.c:2150: warning: dereferencing type-punned pointer will break strict-aliasing rules
iscsi/iscsid.c:2187: warning: dereferencing type-punned pointer will break strict-aliasing rules

iscsi/target.c: In function 'ip_acl':
iscsi/target.c:70: warning: dereferencing pointer 'sa2.29' does break strict-aliasing rules
iscsi/target.c:70: note: initialized from here
iscsi/target.c:49: warning: dereferencing pointer 'sa2.25' does break strict-aliasing rules
iscsi/target.c:49: note: initialized from here
iscsi/target.c:100: warning: dereferencing pointer 'sa2.33' does break strict-aliasing rules
iscsi/target.c:101: note: initialized from here
iscsi/target.c:108: warning: dereferencing pointer 'sa2.35' does break strict-aliasing rules
iscsi/target.c:109: warning: dereferencing pointer 'sa2.35' does break strict-aliasing rules
iscsi/target.c:110: warning: dereferencing pointer 'sa2.35' does break strict-aliasing rules
iscsi/target.c:111: warning: dereferencing pointer 'sa2.35' does break strict-aliasing rules
iscsi/target.c:106: note: initialized from here

iscsi/isns.c: In function 'isns_connect':
iscsi/isns.c:122: warning: dereferencing pointer 'lss.41' does break strict-aliasing rules
iscsi/isns.c:122: note: initialized from here
iscsi/isns.c:132: warning: dereferencing pointer 'lss.43' does break strict-aliasing rules
iscsi/isns.c:132: note: initialized from here
iscsi/isns.c: In function 'isns_init':
iscsi/isns.c:881: warning: dereferencing pointer 'lss.169' does break strict-aliasing rules
iscsi/isns.c:881: note: initialized from here
iscsi/isns.c:883: warning: dereferencing pointer 'lss.171' does break strict-aliasing rules
iscsi/isns.c:883: note: initialized from here

libssc.c: In function 'ssc_read_blkhdr':
libssc.c:199: warning: dereferencing type-punned pointer will break strict-aliasing rules
libssc.c: In function 'ssc_write_blkhdr':
libssc.c:228: warning: dereferencing type-punned pointer will break strict-aliasing rules

Adding -fno-strict-aliasing fixes that

Signed-off-by: Boaz Harrosh <bharrosh@xxxxxxxxxxx>
---
 usr/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usr/Makefile b/usr/Makefile
index 2dcae2a..262300d 100644
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -53,7 +53,7 @@ INCLUDES += -I.
 
 CFLAGS += -D_GNU_SOURCE
 CFLAGS += $(INCLUDES)
-CFLAGS += -g -O2 -Wall -Wstrict-prototypes -fPIC
+CFLAGS += -g -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -fPIC
 CFLAGS += -DTGT_VERSION=\"$(VERSION)$(EXTRAVERSION)\"
 
 LIBS += -lpthread
-- 
1.6.6.1

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux