1
0
Fork 0
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
  commit 113a9392.

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:
Johnothan King 2021-04-08 11:58:07 -07:00 committed by GitHub
parent ecf260c282
commit a065558291
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
96 changed files with 299 additions and 282 deletions

View file

@ -226,7 +226,7 @@ outputs an
prompt specified by
.I "format, .\|.\|."
to the controlling terminal and reads a response from the controlling terminal.
Offirmative response returns
Affirmative response returns
.LR 0 ,
.L EOF
or quit response returns

View file

@ -69,7 +69,7 @@ That is, \fIuserf\fP is called on a directory only after its descendants have
been processed.
The absence of this bit indicates that calls to the user functions
are issued in preorder. That is, \fIuserf\fP is
called on a directory before its descendants are processed.
called on a directory before its descendants are processed.
.IP
FTW_PHYSICAL: Use \fIlstat\fR(2) instead of \fIstat\fR(2) to get
file status and allow detection of symbolic links.

View file

@ -696,7 +696,7 @@ may result in undefined behavior.
.PP
.Ss " int sfgetc(Sfio_t* f)"
.Ss " int sfputc(Sfio_t* f, int c)"
These functions read/write a byte from/to stream \f5f\fP.
These functions read/write a byte from/to stream \f5f\fP.
\f5sfgetc()\fP returns the byte read or \f5-1\fP on error.
\f5sfputc()\fP returns \f5c\fP on success and \f5-1\fP on error.
@ -2356,8 +2356,8 @@ symbol may be removed in a future release.
The printing and scanning functions were extended to handle multibyte characters
and to conform to the C99 standard.
.PP
The function \f5sfpoll()\fP was rehauled to make it useful
for writing servers that must commnunicate with multiple streams
The function \f5sfpoll()\fP was overhauled to make it useful
for writing servers that must communicate with multiple streams
without blocking.
.PP
The formatting pattern \f5%c\fP for \f5sf*printf\fP was extended

View file

@ -284,7 +284,7 @@ events in a \fIregion\fP.
There are two standard disciplines, both with \f5round\fP being 0 and \f5exceptf\fP being \f5NULL\fP.
.TP
.MW Vmdcsystem
A discipline whose \f5memoryf\fP function gets space from the operation system
A discipline whose \f5memoryf\fP function gets space from the operation system
via different available methods which include \fImmap(2)\fP, \fIsbrk(2)\fP and
functions from the WIN32 API.
For historical reason, \fIVmdcsbrk\fP is also available and functions like \fIVmdcsystem\fP.
@ -523,7 +523,7 @@ A \f5Vmstat_t\fP structure has at least these members:
.MW "size_t m_free; /* maximum free block size */
.MW "int n_seg; /* count of segments */
.MW "size_t extent; /* memory extent of region */
.MW "int n_region; /* total Malloc regions */
.MW "int n_region; /* total Malloc regions */
.MW "int n_open; /* non-blocked operations */
.MW "int n_lock; /* blocked operations */
.MW "int n_probe; /* region searches */