Howdy y'all,
This patchset aims to tighten the compiler strictness a bit through
stricter warning flags, fix several defects reported by Coverity
Scan and some found by me, and remove some dead code.
There are some stylistic improvements still to be made (i.e. not casting
the result of a call to xmalloc() and/or malloc()), and this addition of
further warning options (i.e. -Wextra / -W) but with these patches,
I've tested compilation on clang 3.5.0 as well as my local gcc 4.8.4
and that of Travis CI's linux environment (4.6.3-1ubuntu5) and in all
cases it compiles without any warnings or errors.
Enjoy!
Tim
Tim Hentenaar (18):
AM_CFLAGS: Add -ansi -pedantic and some warnings
indent.h: Remove redundant extern declaration of else_or_endif
globs: Fix malloc() wrapper functions
s/free/xfree/g
Move need_chars into handletoken.c
args: Compiler warning fixes
gperf*.c: Fix compiler warnings
texinfo2man: Fix potential buffer overruns and NULL pointer
dereferences
output.c: Remove dead code
output.c: Fix potential NULL pointer dereferences
output.c: Remove unused variable 'boolean_operator'
globs: Fix WARNING and ERROR macros to use char * instead of int *
sys.h: Remove unused INLINE macro
lexi.c: Remove dead code
output: Don't shadow current_column()
Makefile.am: Ensure indent builds with clang
code_io.c: Fix file size test
parse.h: Add prototype for debug_init()
man/texinfo2man.c | 103 +++++++++++++-----------------
src/Makefile.am | 25 ++++++--
src/args.c | 187 +++++++++++++++++++++++++++---------------------------
src/backup.c | 7 +-
src/code_io.c | 2 +-
src/code_io.h | 2 -
src/globs.c | 36 +++++------
src/globs.h | 34 +++-------
src/gperf-cc.c | 38 +++++------
src/gperf.c | 38 +++++------
src/handletoken.c | 52 ++++++++++-----
src/handletoken.h | 25 +-------
src/indent.c | 10 +--
src/indent.h | 9 ---
src/lexi.c | 27 ++++----
src/output.c | 49 ++++++--------
src/parse.c | 4 +-
src/parse.h | 4 ++
src/sys.h | 6 --
19 files changed, 300 insertions(+), 358 deletions(-)
--
2.3.6
_______________________________________________
bug-indent mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-indent