Opened 10 years ago

Closed 10 years ago

#6333 closed enhancement (fixed)

Jamfiles shouldn't use -Wall

Reported by: kaliber Owned by: stippi
Priority: normal Milestone: R1
Component: Build System Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description (last modified by stippi)

BuildSetup defines default warning flags, but some of Jamfiles adds its own. If -Wall is added then it could re-enable some warnings. For example:

BuildSetup defines:

HAIKU_WARNING_CCFLAGS = -Wall -Wno-trigraphs ...

src/add-ons/kernel/drivers/network/etherpci/Jamfile defines:

SubDirCcFlags -Wall ;

and the final CFLAGS are:

-Wall -Wno-trigraphs ... -Wall

Since -Wall implies -Wtrigraphs, the final result may be different then expected.

Attachments (1)

remove-wall.patch (18.4 KB ) - added by kaliber 10 years ago.

Download all attachments as: .zip

Change History (8)

by kaliber, 10 years ago

Attachment: remove-wall.patch added

comment:1 by kaliber, 10 years ago

patch: 01

comment:2 by kaliber, 10 years ago


comment:3 by stippi, 10 years ago

Owner: changed from bonefish to stippi
Status: newin-progress

Patch looks fine to me. Will see if it still applies cleanly.

comment:4 by stippi, 10 years ago

Description: modified (diff)

comment:5 by bonefish, 10 years ago

In the cases where -Wall is removed for the haiku target, -Wno-multichar should be removed as well, as it is in HAIKU_WARNING_{CC,C++}FLAGS, too.

Since the occurrence in src/add-ons/kernel/file_systems/bfs/Jamfile is probably the one that was copied into all the other BFS and file system related Jamfiles, it would be interesting, if Axel had a particular reason to do that (e.g. to explicitly re-enable the otherwise disabled -Wall warnings) or if that is only legacy inherited from ancient times.

comment:6 by axeld, 10 years ago

If memory serves well (although it almost never does ;-)), this is indeed ancient - a long time back we did not use -Wall globally.

comment:7 by stippi, 10 years ago

Resolution: fixed
Status: in-progressclosed

Patch applied hrev39314 (while additionally removing -Wno-multichar for most files in this patch). Thanks!

Note: See TracTickets for help on using tickets.