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
|
@ -88,7 +88,7 @@ struct Namarray
|
|||
void *(*fun)(Namval_t*,const char*,int); /* associative arrays */
|
||||
void *fixed; /* for fixed sized arrays */
|
||||
Dt_t *table; /* for subscripts */
|
||||
void *scope; /* non-zerp when scoped */
|
||||
void *scope; /* non-zero when scoped */
|
||||
};
|
||||
|
||||
/* The context pointer for declaration command */
|
||||
|
@ -167,7 +167,7 @@ struct Namval
|
|||
#define NV_HEXFLOAT (NV_LTOU) /* for C99 base16 float notation */
|
||||
#define NV_FLTSIZEZERO -1 /* a float with size of 0 being <0 */
|
||||
|
||||
/* options for nv_open */
|
||||
/* options for nv_open */
|
||||
|
||||
#define NV_APPEND 0x10000 /* append value */
|
||||
#define NV_MOVE 0x8000000 /* for use with nv_clone */
|
||||
|
@ -231,7 +231,7 @@ struct Namval
|
|||
#define ARRAY_UNDEF (4L<<ARRAY_BITS) /* For ${array} */
|
||||
|
||||
|
||||
/* These are disciplines provided by the library for use with nv_discfun */
|
||||
/* These are disciplines provided by the library for use with nv_discfun */
|
||||
#define NV_DCADD 0 /* used to add named disciplines */
|
||||
#define NV_DCRESTRICT 1 /* variable that are restricted in rsh */
|
||||
|
||||
|
@ -242,7 +242,7 @@ struct Namval
|
|||
# define extern __IMPORT__
|
||||
# endif /* _BLD_shell */
|
||||
#endif /* _DLL */
|
||||
/* prototype for array interface*/
|
||||
/* prototype for array interface */
|
||||
extern Namarr_t *nv_arrayptr(Namval_t*);
|
||||
extern Namarr_t *nv_setarray(Namval_t*,void*(*)(Namval_t*,const char*,int));
|
||||
extern int nv_arraynsub(Namarr_t*);
|
||||
|
@ -285,7 +285,7 @@ extern void nv_setvec(Namval_t*,int,int,char*[]);
|
|||
extern void nv_setvtree(Namval_t*);
|
||||
extern int nv_setsize(Namval_t*,int);
|
||||
extern Namfun_t *nv_disc(Namval_t*,Namfun_t*,int);
|
||||
extern void nv_unset(Namval_t*); /*obsolete */
|
||||
extern void nv_unset(Namval_t*); /* obsolete */
|
||||
extern void _nv_unset(Namval_t*,int);
|
||||
extern Namval_t *nv_search(const char *, Dt_t*, int);
|
||||
extern char *nv_name(Namval_t*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue