1
0
mirror of https://github.com/rfivet/uemacs.git synced 2024-12-18 07:16:23 -05:00

Suppress warnings for implicit fallthrough by parsing comments.

This commit is contained in:
Renaud 2019-11-26 09:05:06 +08:00
parent e71338b261
commit 556ed8d41d
4 changed files with 6 additions and 3 deletions

View File

@ -26,7 +26,7 @@ uname_S := $(shell sh -c 'echo $(uname_S) | sed s/_.*$$//')
PROGRAM=ue PROGRAM=ue
CC=gcc CC=gcc
WARNINGS=-pedantic -Wall -Wextra -Wstrict-prototypes -Wno-unused-parameter WARNINGS=-pedantic -Wall -Wextra -Wstrict-prototypes -Wno-unused-parameter -Wimplicit-fallthrough=2
CFLAGS=-O2 $(WARNINGS) CFLAGS=-O2 $(WARNINGS)
#CC=c89 +O3 # HP #CC=c89 +O3 # HP
#CFLAGS= -D_HPUX_SOURCE -DSYSV #CFLAGS= -D_HPUX_SOURCE -DSYSV
@ -130,7 +130,7 @@ depend: ${SRC}
$(Q) ${CC} ${CFLAGS} ${DEFINES} -c $*.c $(Q) ${CC} ${CFLAGS} ${DEFINES} -c $*.c
# DO NOT DELETE THIS LINE -- make depend uses it # DO NOT DELETE THIS LINE -- make depend uses it
# Updated Tue, Aug 13, 2019 7:51:49 AM # Updated Mon Nov 25 12:50:00 CST 2019
basic.o: basic.c basic.h retcode.h input.h bind.h mlout.h random.h \ basic.o: basic.c basic.h retcode.h input.h bind.h mlout.h random.h \
terminal.h defines.h utf8.h window.h buffer.h line.h terminal.h defines.h utf8.h window.h buffer.h line.h

1
exec.c
View File

@ -795,6 +795,7 @@ static int dobuf(struct buffer *bp)
} }
/* drop down and act just like !BREAK */ /* drop down and act just like !BREAK */
/* fallthrough */
case DBREAK: /* BREAK directive */ case DBREAK: /* BREAK directive */
if (dirnum == DBREAK && execlevel) if (dirnum == DBREAK && execlevel)
goto onward; goto onward;

View File

@ -285,6 +285,8 @@ int execute( int c, int f, int n) {
break ; break ;
} }
/* fallthrough */
default: default:
status = linsert( n, c) ; status = linsert( n, c) ;
} }

View File

@ -1542,7 +1542,7 @@ static int cclmake(char **ppatptr, struct magic *mcptr)
*/ */
case MC_ESC: case MC_ESC:
pchr = *++patptr; pchr = *++patptr;
/* falltrhough */ /* fallthrough */
default: default:
setbit(pchr, bmap); setbit(pchr, bmap);
break; break;