From b6718db84a5da02c57c6bc44fb80dd53e5c33728 Mon Sep 17 00:00:00 2001 From: Toomas Soome Date: Sat, 1 Jul 2017 10:43:17 +0300 Subject: [PATCH] 8498 ficl: variable 'count' might be clobbered by 'longjmp' or 'vfork' --- usr/src/common/ficl/vm.c | 2 +- usr/src/lib/libficl/Makefile.com | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/usr/src/common/ficl/vm.c b/usr/src/common/ficl/vm.c index 1917d3fd90..5140c9ceae 100644 --- a/usr/src/common/ficl/vm.c +++ b/usr/src/common/ficl/vm.c @@ -252,7 +252,7 @@ ficlVmInnerLoop(ficlVm *vm, ficlWord *fw) jmp_buf exceptionHandler; int except; int once; - int count; + volatile int count; /* volatile because of longjmp */ ficlInstruction instruction; ficlInteger i; ficlUnsigned u; diff --git a/usr/src/lib/libficl/Makefile.com b/usr/src/lib/libficl/Makefile.com index cf4e4f03dd..78f3aa69a0 100644 --- a/usr/src/lib/libficl/Makefile.com +++ b/usr/src/lib/libficl/Makefile.com @@ -31,6 +31,11 @@ FICLDIR= $(SRC)/common/ficl C99MODE= $(C99_ENABLE) CPPFLAGS += -I.. -I$(FICLDIR) -D_LARGEFILE64_SOURCE=1 +# As variable "count" is marked volatile, gcc 4.4.4 will complain about +# function argument. So we switch this warning off +# for time being, till gcc 4.4.4 will be replaced. +pics/vm.o := CERRWARN += -Wno-clobbered + LDLIBS += -luuid -lc -lm -lumem HEADERS= $(FICLDIR)/ficl.h $(FICLDIR)/ficltokens.h ../ficllocal.h \ -- 2.11.4.GIT