mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Clean up and improve the devel/ scripts.
This commit is contained in:
parent
c7db17bcec
commit
f29b75fb1d
@ -1,7 +0,0 @@
|
||||
BDECFLAGS="-W -Wall -ansi -pedantic -Wbad-function-cast -Wcast-align \
|
||||
-Wcast-qual -Wchar-subscripts -Winline -Wmissing-prototypes -Wnested-externs \
|
||||
-Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings"
|
||||
|
||||
(cd trunk &&
|
||||
rm -f darkhttpd &&
|
||||
make bsd CFLAGS="$BDECFLAGS -g -DDEBUG -DTORTURE")
|
@ -1,12 +1,14 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Run through the clang static analyzer
|
||||
# Run through the clang static analyzer.
|
||||
#
|
||||
TARGET=$(dirname $0)/../darkhttpd.c
|
||||
|
||||
# Adjust to suit:
|
||||
LLVM=$HOME/llvm
|
||||
CHECKER=$LLVM/llvm/tools/clang/tools/scan-build/ccc-analyzer
|
||||
|
||||
env PATH=$LLVM/build/Release/bin:$PATH $CHECKER ../darkhttpd.c
|
||||
|
||||
rm -f a.out
|
||||
$LLVM/llvm/tools/clang/tools/scan-build/scan-build \
|
||||
-analyze-headers \
|
||||
--use-analyzer=$LLVM/install/bin/clang \
|
||||
clang $TARGET
|
||||
|
@ -1,48 +1,13 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Build with clang with all warnings
|
||||
# Build with clang with all warnings.
|
||||
#
|
||||
TARGET=$(dirname $0)/../darkhttpd.c
|
||||
|
||||
# Adjust to suit:
|
||||
LLVM=$HOME/llvm
|
||||
CLANG=$LLVM/build/Release/bin/clang
|
||||
|
||||
BDECFLAGS="-W -Wall -pedantic -Wbad-function-cast -Wcast-align \
|
||||
-Wcast-qual -Wchar-subscripts -Winline \
|
||||
-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
|
||||
-Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings"
|
||||
# local change: removed -ansi above
|
||||
|
||||
# disabled:
|
||||
# -Wunreachable-code
|
||||
|
||||
$CLANG -std=c99 $BDECFLAGS \
|
||||
-Wextra -Waddress -Waggregate-return \
|
||||
-Wcomment \
|
||||
-Wdisabled-optimization \
|
||||
-Wconversion \
|
||||
-Wempty-body \
|
||||
-Wfloat-equal -Wformat -Wformat=2 \
|
||||
-Wformat-nonliteral \
|
||||
-Wformat-security -Wformat-y2k \
|
||||
-Wignored-qualifiers -Wimplicit \
|
||||
-Winit-self \
|
||||
-Winvalid-pch \
|
||||
-Wlong-long -Wmain \
|
||||
-Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute \
|
||||
-Wmissing-include-dirs -Wmissing-noreturn \
|
||||
-Woverlength-strings -Wpacked \
|
||||
-Wpadded -Wparentheses \
|
||||
-Wreturn-type -Wsequence-point -Wsign-compare \
|
||||
-Wstack-protector -Wstrict-aliasing \
|
||||
-Wstrict-overflow -Wstrict-overflow=5 -Wswitch \
|
||||
-Wswitch-default -Wswitch-enum -Wtrigraphs \
|
||||
-Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas \
|
||||
-Wunused -Wunused-function -Wunused-label \
|
||||
-Wunused-parameter -Wunused-value -Wunused-variable \
|
||||
-Wvariadic-macros -Wvla -Wvolatile-register-var \
|
||||
-Wabi \
|
||||
-O -pipe -fstrict-aliasing ../darkhttpd.c
|
||||
|
||||
echo errcode: $?
|
||||
$LLVM/install/bin/clang \
|
||||
-Weverything -Wno-unreachable-code -Wno-padded \
|
||||
-O $TARGET
|
||||
rm -f a.out
|
||||
|
47
devel/warns
47
devel/warns
@ -2,48 +2,9 @@
|
||||
#
|
||||
# Build with pretty-much all GCC warnings enabled.
|
||||
#
|
||||
TARGET=$(dirname $0)/../darkhttpd.c
|
||||
|
||||
# from FreeBSD's src/share/examples/etc/make.conf,v 1.279.10.3.2.1
|
||||
BDECFLAGS="-W -Wall -pedantic -Wbad-function-cast -Wcast-align \
|
||||
-Wcast-qual -Wchar-subscripts -Winline \
|
||||
-Wmissing-prototypes -Wnested-externs -Wpointer-arith \
|
||||
-Wredundant-decls -Wshadow -Wstrict-prototypes -Wwrite-strings"
|
||||
# local change: removed -ansi above
|
||||
|
||||
# disabling:
|
||||
# -Wunreachable-code
|
||||
# -Wconversion
|
||||
#
|
||||
# (usually wrong, too noisy, complain about macros from system headers)
|
||||
|
||||
gcc -std=c99 $BDECFLAGS \
|
||||
-Wextra -Waddress -Waggregate-return \
|
||||
-Warray-bounds \
|
||||
-Wclobbered \
|
||||
-Wcomment -Wcoverage-mismatch \
|
||||
-Wdisabled-optimization \
|
||||
-Wempty-body \
|
||||
-Wfloat-equal -Wformat -Wformat=2 \
|
||||
-Wformat-nonliteral \
|
||||
-Wformat-security -Wformat-y2k \
|
||||
-Wignored-qualifiers -Wimplicit \
|
||||
-Winit-self \
|
||||
-Winvalid-pch \
|
||||
-Wunsafe-loop-optimizations -Wlogical-op -Wlong-long -Wmain \
|
||||
-Wmissing-braces -Wmissing-field-initializers -Wmissing-format-attribute \
|
||||
-Wmissing-include-dirs -Wmissing-noreturn \
|
||||
-Woverlength-strings -Wpacked \
|
||||
-Wpacked-bitfield-compat -Wpadded -Wparentheses \
|
||||
-Wreturn-type -Wsequence-point -Wsign-compare \
|
||||
-Wsign-conversion -Wstack-protector -Wstrict-aliasing \
|
||||
-Wstrict-overflow -Wstrict-overflow=5 -Wswitch \
|
||||
-Wswitch-default -Wswitch-enum -Wsync-nand -Wtrigraphs \
|
||||
-Wtype-limits -Wundef -Wuninitialized -Wunknown-pragmas \
|
||||
-Wunused -Wunused-function -Wunused-label \
|
||||
-Wunused-parameter -Wunused-value -Wunused-variable \
|
||||
-Wvariadic-macros -Wvla -Wvolatile-register-var \
|
||||
-Wabi \
|
||||
-O -pipe -fstrict-aliasing ../darkhttpd.c
|
||||
|
||||
echo errcode: $?
|
||||
gcc -O -fstrict-aliasing \
|
||||
--all-warnings --extra-warnings \
|
||||
$TARGET
|
||||
rm -f a.out
|
||||
|
Loading…
Reference in New Issue
Block a user