diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d8ab13..61b9756 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,10 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04] + os: [ubuntu-22.04] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Add 64-bit mingw-w64 to the PATH run: | echo "c:/msys64/bin;c:/msys64/mingw64/bin" >> $GITHUB_PATH diff --git a/Makefile b/Makefile index 05c23ee..048541b 100644 --- a/Makefile +++ b/Makefile @@ -38,7 +38,7 @@ DBG ?= -g OPTIM ?= -O2 LFLAGS = -t MYLDFLAGS = $(LDFLAGS) $(DBG) -MYCFLAGS = $(OPTIM) $(DBG) $(CFLAGS) #-Wall +MYCFLAGS = -D_GNU_SOURCE $(OPTIM) $(DBG) $(CFLAGS) -ansi -Wall MYCXXFLAGS = $(MYCFLAGS) LDADD = -lstdc++ -lfl @@ -46,8 +46,8 @@ LDADD = -lstdc++ -lfl .SUFFIXES: .l .c .C .o GENSRCS = mcstrip.c scan.c -BLDSRCS = lib.C main.C strerror.c -MCSOBJS = mcstrip.o strerror.o +BLDSRCS = lib.C main.C +MCSOBJS = mcstrip.o CYCOBJS = main.o lib.o SCNOBJS = scan.o @@ -117,9 +117,7 @@ install-targets: make-install-dirs $(INSTALL_DATA) mccabe.example $(DOCDIR) clean: - $(RM) cyclo mcstrip core *.o *~ + $(RM) cyclo mcstrip core *.o *~ *.metrics *.preproc *.stripped cleanall: clean $(RM) $(GENSRCS) - - diff --git a/Makefile.test b/Makefile.test index d270133..3a155ba 100644 --- a/Makefile.test +++ b/Makefile.test @@ -28,8 +28,8 @@ LDADD = -lstdc++ -lfl .SUFFIXES: .o .c .C .l GENSRCS = mcstrip.c scan.c -BLDSRCS = lib.C main.C strerror.c -MCSOBJS = mcstrip.o strerror.o +BLDSRCS = lib.C main.C +MCSOBJS = mcstrip.o CYCOBJS = main.o lib.o SCNOBJS = scan.o diff --git a/list.h b/list.h index 4b0deeb..a4f3fe8 100644 --- a/list.h +++ b/list.h @@ -24,7 +24,7 @@ third party claims) arising therefrom. // NOTE: _LIST_CLASSTYPE should be a text only single token. Use typedefs. #ifndef COREDUMP -#define COREDUMP *((char*)0)=0 // causes a segmentation fault (only under UNIX) +#define COREDUMP *((volatile char*)0)=0 // causes a segmentation fault (only under UNIX) #endif #ifndef _LIST_CLASSNAME diff --git a/mcstrip.l b/mcstrip.l index e4ba9c1..dd0beb2 100644 --- a/mcstrip.l +++ b/mcstrip.l @@ -36,7 +36,6 @@ extern int getopt(); #include #include -#include "strerror.h" /* this aren't declared yet */ int yylex(); diff --git a/stack.h b/stack.h index 865aac3..9bb7645 100644 --- a/stack.h +++ b/stack.h @@ -23,7 +23,7 @@ third party claims) arising therefrom. // NOTE: _STACK_TYPE should be a text only single token. Use typedefs. #ifndef COREDUMP -#define COREDUMP *((char*)0)=0 // causes a segmentation fault (only under UNIX) +#define COREDUMP *((volatile char*)0)=0 // causes a segmentation fault (only under UNIX) #endif #ifndef _STACK_CLASSNAME