mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix more compiler warnings, typos and other minor issues (#260)
Many of these changes are minor typo fixes. The other changes (which are mostly compiler warning fixes) are: NEWS: - The --globcasedetect shell option works on older Linux kernels when used with FAT32/VFAT file systems, so remove the note about it only working with 5.2+ kernels. src/cmd/ksh93/COMPATIBILITY: - Update the documentation on function scoping with an addition from ksh93v- (this does apply to ksh93u+). src/cmd/ksh93/edit/emacs.c: - Check for '_AST_ksh_release', not 'AST_ksh_release'. src/cmd/INIT/mamake.c, src/cmd/INIT/ratz.c, src/cmd/INIT/release.c, src/cmd/builtin/pty.c: - Add more uses of UNREACHABLE() and noreturn, this time for the build system and pty. src/cmd/builtin/pty.c, src/cmd/builtin/array.c, src/cmd/ksh93/sh/name.c, src/cmd/ksh93/sh/nvtype.c, src/cmd/ksh93/sh/suid_exec.c: - Fix six -Wunused-variable warnings (the name.c nv_arrayptr() fixes are also in ksh93v-). - Remove the unused 'tableval' function to fix a -Wunused-function warning. src/cmd/ksh93/sh/lex.c: - Remove unused 'SHOPT_DOS' code, which isn't enabled anywhere. https://github.com/att/ast/issues/272#issuecomment-354363112 src/cmd/ksh93/bltins/misc.c, src/cmd/ksh93/bltins/trap.c, src/cmd/ksh93/bltins/typeset.c: - Add dictionary generator function declarations for former aliases that are now builtins (re:1fbbeaa1
,ef1621c1
,3ba4900e
). - For consistency with the rest of the codebase, use '(void)' instead of '()' for print_cpu_times. src/cmd/ksh93/sh/init.c, src/lib/libast/path/pathshell.c: - Move the otherwise unused EXE macro to pathshell() and only search for 'sh.exe' on Windows. src/cmd/ksh93/sh/xec.c, src/lib/libast/include/ast.h: - Add an empty definition for inline when compiling with C89. This allows the timeval_to_double() function to be inlined. src/cmd/ksh93/include/shlex.h: - Remove the unused 'PIPESYM2' macro. src/cmd/ksh93/tests/pty.sh: - Add '# err_exit #' to count the regression test added in commit113a9392
. src/lib/libast/disc/sfdcdio.c: - Move diordwr, dioread, diowrite and dioexcept behind '#ifdef F_DIOINFO' to fix one -Wunused-variable warning and multiple -Wunused-function warnings (sfdcdio() only uses these functions when F_DIOINFO is defined). src/lib/libast/string/fmtdev.c: - Fix two -Wimplicit-function-declaration warnings on Linux by including sys/sysmacros.h in fmtdev().
This commit is contained in:
parent
ecf260c282
commit
a065558291
96 changed files with 299 additions and 282 deletions
|
@ -423,7 +423,7 @@
|
|||
03-09-23 ratz.c: fix tar header number parse bug that skipped to next number
|
||||
regress.sh: rm cleanup now handles files matching -*
|
||||
03-09-11 iffe.sh: add unnamed { ... } blocks
|
||||
regress.sh: add COPY from to, like MOVE but comprison still done
|
||||
regress.sh: add COPY from to, like MOVE but comparison still done
|
||||
regress.sh: rm -rfu to handle test dirs w/o u+rwx
|
||||
03-08-14 Makefile: add hello.c to the manifest
|
||||
03-08-11 package.sh: fix `html binary' generation
|
||||
|
@ -522,7 +522,7 @@
|
|||
make.probe: add CC.LD.STRIP for link time a.out strip
|
||||
package.sh: fix package_use vs. PACKAGE_USE check
|
||||
02-10-24 WWW.mk: fix bug that required a :WWWBIN: assertion to post
|
||||
02-10-23 mamake.c: fix unuinitialized time in make()
|
||||
02-10-23 mamake.c: fix uninitialized time in make()
|
||||
ratz.c: fix meter buffer overflow
|
||||
02-10-20 package.sh: fix lib/probe/C/make/probe update test
|
||||
02-10-18 probe.win32: update for mingw
|
||||
|
@ -604,7 +604,7 @@
|
|||
package.sh: add check for { cc ar nm yacc/bison } before make
|
||||
ratz.c: fix "rb" vs. "r" macro tests
|
||||
iffe.sh: add nxt, similar to lcl but defines _nxt_foo for #include
|
||||
iffe.sh,package.sh: remove vaibale from sccs,cvs ident strings -- duh
|
||||
iffe.sh,package.sh: remove variable from sccs,cvs ident strings -- duh
|
||||
02-01-24 C+probe: check CC.DYNAMIC to handle cc that accept but ignore -B*
|
||||
iffe.sh: handle 'mem struct.a.b'
|
||||
02-01-22 iffe.sh: cache (internal) `foo vs. struct foo' test results
|
||||
|
@ -855,7 +855,7 @@
|
|||
98-05-01 regress: fix bug sometimes didn't list last test
|
||||
98-04-01 hostinfo: add cc path arg
|
||||
hostinfo: now works with /bin/sh
|
||||
Makefile: strengthed -lm probe
|
||||
Makefile: strengthen -lm probe
|
||||
98-01-23 Makefile: check for -ldl -lm
|
||||
C.probe: handle gcc -v -E phony include dirs
|
||||
iffe: fix lcl by dropping sort -u -- we need the real first
|
||||
|
|
|
@ -2157,8 +2157,8 @@ main(int argc, char** argv)
|
|||
search(state.vars, "-strip-symbols", "1");
|
||||
continue;
|
||||
case '?':
|
||||
error(ERROR_USAGE|4, "%s", opt_info.arg);
|
||||
continue;
|
||||
error(ERROR_usage(2), "%s", opt_info.arg);
|
||||
UNREACHABLE();
|
||||
case ':':
|
||||
error(2, "%s", opt_info.arg);
|
||||
continue;
|
||||
|
@ -2166,7 +2166,10 @@ main(int argc, char** argv)
|
|||
break;
|
||||
}
|
||||
if (error_info.errors)
|
||||
error(ERROR_USAGE|4, "%s", optusage(NiL));
|
||||
{
|
||||
error(ERROR_usage(2), "%s", optusage(NiL));
|
||||
UNREACHABLE();
|
||||
}
|
||||
argv += opt_info.index;
|
||||
#else
|
||||
while ((s = *++argv) && *s == '-')
|
||||
|
|
|
@ -426,8 +426,8 @@ typedef uLong FAR uLongf;
|
|||
# define z_off_t off_t
|
||||
#endif
|
||||
#ifndef SEEK_SET
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
#ifndef z_off_t
|
||||
|
@ -1391,7 +1391,7 @@ typedef struct internal_state {
|
|||
*/
|
||||
|
||||
int level; /* compression level (1..9) */
|
||||
int strategy; /* favor or force Huffman coding*/
|
||||
int strategy; /* favor or force Huffman coding */
|
||||
|
||||
uInt good_match;
|
||||
/* Use a faster search when the previous match is longer than this */
|
||||
|
@ -2087,7 +2087,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
|
|||
unsigned dmask; /* mask for first level of distance codes */
|
||||
code this; /* retrieved table entry */
|
||||
unsigned op; /* code bits, operation, extra bits, or */
|
||||
/* window position, window bytes to copy */
|
||||
/* window position, window bytes to copy */
|
||||
unsigned len; /* match length, unused bytes */
|
||||
unsigned dist; /* match distance */
|
||||
unsigned char FAR *from; /* where to copy match from */
|
||||
|
@ -4813,8 +4813,8 @@ char** argv;
|
|||
sfprintf(sfstdout, "%s\n", id + 10);
|
||||
return 0;
|
||||
case '?':
|
||||
error(ERROR_USAGE|4, "%s", opt_info.arg);
|
||||
continue;
|
||||
error(ERROR_usage(2), "%s", opt_info.arg);
|
||||
UNREACHABLE();
|
||||
case ':':
|
||||
error(2, "%s", opt_info.arg);
|
||||
continue;
|
||||
|
@ -4822,7 +4822,10 @@ char** argv;
|
|||
break;
|
||||
}
|
||||
if (error_info.errors)
|
||||
error(ERROR_USAGE|4, "%s", optusage(NiL));
|
||||
{
|
||||
error(ERROR_usage(2), "%s", optusage(NiL));
|
||||
UNREACHABLE();
|
||||
}
|
||||
argv += opt_info.index;
|
||||
#else
|
||||
while ((s = *++argv) && *s == '-' && *(s + 1))
|
||||
|
|
|
@ -238,8 +238,8 @@ main(int argc, char** argv)
|
|||
sfprintf(sfstdout, "%s\n", id + 10);
|
||||
return 0;
|
||||
case '?':
|
||||
error(ERROR_USAGE|4, "%s", opt_info.arg);
|
||||
continue;
|
||||
error(ERROR_usage(2), "%s", opt_info.arg);
|
||||
UNREACHABLE();
|
||||
case ':':
|
||||
error(2, "%s", opt_info.arg);
|
||||
continue;
|
||||
|
@ -247,7 +247,10 @@ main(int argc, char** argv)
|
|||
break;
|
||||
}
|
||||
if (error_info.errors)
|
||||
error(ERROR_USAGE|4, "%s", optusage(NiL));
|
||||
{
|
||||
error(ERROR_usage(2), "%s", optusage(NiL));
|
||||
UNREACHABLE();
|
||||
}
|
||||
argv += opt_info.index;
|
||||
#else
|
||||
while ((s = *++argv) && *s == '-' && *(s + 1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue