Commit Graph

46 Commits

Author SHA1 Message Date
mrg
de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
sevan
39bbc68a3b Drop main() prototype. 2016-09-05 00:40:28 +00:00
snj
f0a7346d21 src is too big these days to tolerate superfluous apostrophes. It's
"its", people!
2014-10-18 08:33:23 +00:00
plunky
87d4f6076b Apply casts to cases where xdrproc_t is expected but is not
strictly passed, for example because the second argument is
a different kind of pointer.
2011-08-30 17:06:20 +00:00
lukem
c1ceae17f0 Enable WARNS=4 by default for usr.bin, except for:
awk  bdes  checknr  compile_et  error  gss  hxtool  kgetcred  kinit
	klist  ldd  less  lex  locale  login  m4  man  menuc  mk_cmds
	mklocale  msgc  openssl  rpcgen  rpcinfo  sdiff  spell  ssh
	string2key  telnet  tn3270  verify_krb5_conf  xlint
2009-04-14 22:15:16 +00:00
perry
8b0f9554ff convert __attribute__s to applicable cdefs.h macros 2007-12-15 19:44:37 +00:00
tls
4147a3c54a Add new Makefile knob, USE_FORT, which extends USE_SSP by turning on the
FORTIFY_SOURCE feature of libssp, thus checking the size of arguments to
various string and memory copy and set functions (as well as a few system
calls and other miscellany) where known at function entry.  RedHat has
evidently built all "core system packages" with this option for some time.

This option should be used at the top of Makefiles (or Makefile.inc where
this is used for subdirectories) but after any setting of LIB.

This is only useful for userland code, and cannot be used in libc or in
any code which includes the libc internals, because it overrides certain
libc functions with macros.  Some effort has been made to make USE_FORT=yes
work correctly for a full-system build by having the bsd.sys.mk logic
disable the feature where it should not be used (libc, libssp iteself,
the kernel) but no attempt has been made to build the entire system with
USE_FORT and doing so will doubtless expose numerous bugs and misfeatures.

Adjust the system build so that all programs and libraries that are setuid,
directly handle network data (including serial comm data), perform
authentication, or appear likely to have (or have a history of having)
data-driven bugs (e.g. file(1)) are built with USE_FORT=yes by default,
with the exception of libc, which cannot use USE_FORT and thus uses
only USE_SSP by default.  Tested on i386 with no ill results; USE_FORT=no
per-directory or in a system build will disable if desired.
2007-05-28 12:06:17 +00:00
christos
9eb4baf479 From Liam Foy:
- Print uptime in secs if uptime is less than 1 minute
- If at least one call to onehost() fails, return one (allows for external error detection)
- Avoid leaks, use clnt_destroy (from OpenBSD)
- err(3) cleans
From me:
- lint cleanups
- more KNF
2005-08-07 16:01:45 +00:00
jmmv
b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
itojun
50847da5c5 safer use of realloc 2003-10-16 06:56:17 +00:00
agc
89aaa1bb64 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22365, verified by myself.
2003-08-07 11:13:06 +00:00
grant
be8ae688ae New sentence, new line. 2002-09-30 11:08:56 +00:00
wiz
f407c50a71 Use standard headers, punctuation nit. 2001-12-08 19:13:08 +00:00
wiz
aded0d2cce Whitespace cleanup. 2001-12-01 16:43:07 +00:00
cgd
fdfcf1962d labels (even default:) _must_ be followed by statements! usr.bin/fgen/fgen.l 2001-01-16 02:43:37 +00:00
enami
8ab9946e10 Substitute the cross reference to portmap(8) with rpcbind(8). 2000-07-03 10:06:24 +00:00
fvdl
f99c32bacc Complete ANSIfication. 2000-06-03 19:32:34 +00:00
fvdl
5531feb1a7 USe new RPC interface. 2000-06-02 23:20:49 +00:00
simonb
d88dfea295 Don't declare 'extern opt*' getopt variables. 2000-04-14 06:11:07 +00:00
jdolecek
7bcd049d31 Remove spurious ^L, as per bin/9574 by Thilo Manske.
While here, const poison a little.
2000-03-08 12:10:28 +00:00
hubertf
4b53c6d85d If printing of a host's time is requested via the -d switch, condense
output so it doesn't exceed 80 columns.

Patch submitted in PR 5933 by Tim Rightnour <root@garbled.net>
1999-07-30 01:29:30 +00:00
garbled
9e44e9b578 More and more .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages.  Many more to
come.
1999-03-22 18:16:34 +00:00
abs
27107cb9f0 If up for one minute, report "1 min, " not "1 mins,". 1999-01-10 08:19:23 +00:00
perry
36af0320ed add includes to fix compiler warning 1998-02-03 04:04:58 +00:00
lukem
d177c90289 s/bzero/memset, fix .Nm usage 1997-10-19 14:25:00 +00:00
drochner
3cb8fe8b6b Fix compiler warnings (because new prototypes came into scope
with latest "rpc.h" changes). It's -Wall ready now.
1997-08-24 10:53:16 +00:00
perry
bf059fab25 make rup handle uptimes of more than 1 year per pr-3060 1997-01-16 22:18:16 +00:00
thorpej
19f013a504 RCS id police. 1996-09-27 01:46:08 +00:00
thorpej
13a88ddb50 Correct time display for 12:xx case.
From Dave Huang <khym@bga.com>, PR #2734.
1996-09-27 01:44:58 +00:00
cgd
9e97520947 specify man pages the new way. 1994-12-22 12:30:38 +00:00
pk
7080a02c57 clnt_call requires timeval argument 1994-02-05 14:58:14 +00:00
jtc
2c7d5d92c9 Fix spelling errors. 1994-01-11 18:22:48 +00:00
jtc
fe6e50dbb6 Implemented sorting options found in Sun's rup. 1993-12-09 23:58:02 +00:00
deraadt
28b31be6fa put -t in the usage line 1993-12-03 23:34:10 +00:00
deraadt
b52aae9d1e more sane output.
option -t: print remote-host's time
1993-11-10 03:52:18 +00:00
jtc
ac5c852d4b Make sure we use rstat's protocol's values of FSCALE. We were picking up
the FSCALE from sys/param.h which caused all of the load averages from
remote machines to be incorrect.
1993-09-23 18:37:28 +00:00
jtc
5068ba496f Add cross references to "SEE ALSO" section. 1993-09-16 01:56:34 +00:00
jtc
29d9ea22b8 Change Sun-OS to SunOS. Every other instance of in manual our manual
is typeset that way.
1993-09-16 01:30:19 +00:00
mycroft
aee4b07b8a Add RCS identifiers, remove some completely useless RCS logs and patchkit
headers, and a few other insignificant changes.
1993-08-02 17:48:44 +00:00
brezak
adbc81e9d6 Line buffer output to work better with more. 1993-06-10 12:28:06 +00:00
brezak
415b090a43 Fix calling clnt_sperror() 1993-06-09 19:50:08 +00:00
brezak
2c5f9c800f Fix man page. 1993-06-08 19:23:30 +00:00
brezak
b9ff14e137 Widen host name. 1993-06-08 14:46:03 +00:00
brezak
2599553ff2 Cleanup man page; convert to mandoc. 1993-06-08 01:51:06 +00:00
brezak
db60ef9d46 No need to link with -lrpc 1993-06-04 14:53:53 +00:00
brezak
5f2b367636 Add rup and rusers. Changes to rwall 1993-06-03 19:32:26 +00:00