Skip to content

Commit f74cc9d

Browse files
besser82solardiz
authored andcommitted
Make.defs: Add "-Wextra" to default CFLAGS.
Add an option to enable "-Werror" also. Signed-off-by: Björn Esser <[email protected]>
1 parent f46ca81 commit f74cc9d

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
* pam_tcb/support.h (pam_tcb_getlogin): New function.
1111
Small static inline wrapper around getlogin(3).
1212

13+
* Make.defs: Add "-Wextra" to default CFLAGS. Add an option to
14+
enable "-Werror" also.
15+
1316
2021-09-25 Björn Esser <besser82 at fedoraproject.org>
1417

1518
* pam_tcb/support.c (_set_ctrl): Request automatic prefix only if

Make.defs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@ CC = gcc
22
INSTALL = install -p
33
MKDIR = mkdir
44

5+
# Flag to enable -Werror on build.
6+
WERROR =
7+
58
DBGFLAG = #-ggdb
69
ifndef CFLAGS
710
CFLAGS = -O2
811
endif
9-
CFLAGS += $(DBGFLAG) -I../include -Wall
12+
CFLAGS += $(DBGFLAG) -I../include
13+
CFLAGS += -Wall -Wextra
14+
ifneq ($(WERROR),)
15+
CFLAGS += -Werror
16+
endif
1017
#CFLAGS += -DFAIL_RECORD
1118
LDFLAGS += $(DBGFLAG) -L../libs
1219

0 commit comments

Comments
 (0)