cdesktopenv/src/lib/libast/tm
Johnothan King 733f70e94b
Fix many compiler warnings and remove unused variables (#191)
Most of these changes remove unused variables, functions and labels
to fix -Wunused compiler warnings. Somewhat notable changes:

src/cmd/ksh93/bltins/print.c:
- Removed the unused 'neg' variable.
  Patch from ksh2020: https://github.com/att/ast/pull/725

src/cmd/ksh93/bltins/sleep.c:
- Initialized ns to fix three -Wsometimes-uninitialized warnings.

src/cmd/ksh93/edit/{emacs,vi}.c:
- Adjust strncpy size to fix two -Wstringop-truncation warnings.

src/cmd/ksh93/include/shell.h:
- The NOT_USED macro caused many -Wunused-value warnings,
  so it has been replaced with ksh2020's macro:
  https://github.com/att/ast/commit/19d0620a

src/cmd/ksh93/sh/expand.c:
- Removed an unnecessary 'ap = ' since 'ap' is never read
  between stakseek and stakfreeze.

src/cmd/ksh93/edit/vi.c: refresh():
- Undef this function's 'w' macro at the end of it to stop it
  potentially interfering with future code changes.

src/cmd/ksh93/sh/nvdisc.c,
src/lib/libast/misc/magic.c,
src/lib/libast/regex/regsubexec.c,
src/lib/libast/sfio/sfpool.c,
src/lib/libast/vmalloc/vmbest.c:
- Fixed some indentation to silence -Wmisleading-indentation
  warnings.

src/lib/libast/include/ast.h:
- For clang, now only suppress hundreds of -Wparentheses warnings
  as well as a few -Wstring-plus-int warnings.
  Clang's -Wparentheses warns about things like
  	if(foo = bar())
  which assigns to foo and checks the assigned value.
  Clang wants us to change this into
  	if((foo = bar()))
  Clang's -Wstring-plus-int warns about things like
  	"string"+x
  where x is an integer, e.g. "string"+3 represents the string
  "ing". Clang wants us to change that to
  	"string"[3]
  The original versions represent a perfectly valid coding style
  that was common in the 1980s and 1990s and is not going to change
  in this historic code base. (gcc does not complain about these.)

Co-authored-by: Martijn Dekker <martijn@inlv.org>
2021-02-22 22:16:32 +00:00
..
tmdata.c Part-revert GMT->UTC change (re: c9634e90) 2020-06-30 02:46:47 +02:00
tmdate.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmequiv.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmfix.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmfmt.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmform.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmgoff.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tminit.c Backport changes to AST time library from ksh 93v- beta 2021-01-21 13:58:30 +00:00
tmleap.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmlex.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmlocale.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmmake.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmpoff.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmscan.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmsleep.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmtime.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmtype.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmweek.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmword.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmxdate.c Fix many compiler warnings and remove unused variables (#191) 2021-02-22 22:16:32 +00:00
tmxduration.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmxfmt.c Backport changes to AST time library from ksh 93v- beta 2021-01-21 13:58:30 +00:00
tmxgettime.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmxleap.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmxmake.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmxscan.c Backport changes to AST time library from ksh 93v- beta 2021-01-21 13:58:30 +00:00
tmxsettime.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmxsleep.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmxtime.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmxtouch.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tmzone.c Backport changes to AST time library from ksh 93v- beta 2021-01-21 13:58:30 +00:00
tvcmp.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tvgettime.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tvsettime.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
tvsleep.c libast: Improve and harden tvsleep (re: 72968eae) (#186) 2021-02-19 22:58:04 +00:00
tvtouch.c Fix build on systems without O_CLOEXEC (re: 9f43f8d1) 2021-01-23 00:40:00 +00:00