Commit Graph

130 Commits

Author SHA1 Message Date
andvar 634b965029 fix few typos in comments for word "because". 2022-03-04 21:12:03 +00:00
andvar c11ca9eaa9 fix few typos in comments. 2022-01-11 22:45:56 +00:00
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
dholland 7944f94c11 u_int -> unsigned int, in some of the output.
In the bulk of the output making this change would require reworking a
bunch of the internals to allow spaces in type names, which at the
moment doesn't seem worthwhile.
2016-01-23 02:33:09 +00:00
christos 5851f02af6 Delete extra declaration of svc_fdset... And some commented out code.
This badly needs some modernization.
2015-11-08 01:59:31 +00:00
kamil 21207296f6 Prefer error messages resolved from errno over handwritten ones. 2015-09-20 16:57:13 +00:00
kamil ca8a5c231b Correct #ifdef/#endif header file guards generator for files with names
other than alphanumerical.

For example, for a file named config-subscriber.x we were generating a
symbol '_CONFIG-SUBSCRIBER_H'.

Since now all non alphanumerical characters will be converted to '_' and we
will prevent from generating symbols starting with "__", what's reserved
for the internal compiler code parsers and generators.
2015-09-20 16:39:04 +00:00
kamil facb255330 Correct newstyle code generation
For newstyle we used to generate oldstyle code. This bug has been fixed in
FreeBSD on 13 Dec 1995 by wpaul.

15a1e09c3d

Reviewed by <christos>, <pgoyette>
2015-09-20 15:52:11 +00:00
kamil 29aa8e74c1 Fix NULL pointer dereference
After the last function improvements there is invalid plist dereference
at the beginning of the second for () external loop. Move the proper check
inside the internal secound for () loop, after plist reinitialization.
2015-09-20 15:45:07 +00:00
joerg 1d5828794c Mark error as dead. 2015-05-13 20:13:21 +00:00
dholland 5a52d2d51f Remove pointless casts. 2015-05-09 23:29:51 +00:00
dholland 90a10bbb8a Make error() printflike instead of using sprintf before calling it. 2015-05-09 23:28:43 +00:00
dholland 98fbb52a77 Use proper (enough) parentheses in macro expansion. 2015-05-09 23:19:34 +00:00
dholland 86f52a859f Use errx when malloc fails, and also don't cast the return value of
malloc/realloc.
2015-05-09 23:16:51 +00:00
dholland d4e3de0b16 one crash -> errx Christos missed 2015-05-09 23:14:22 +00:00
dholland ceecfabaa7 Polish the error messages.
Don't use warn/err to print error messages about the input, as
prepending the program name to those both isn't helpful and confuses
programs that try to parse compile logs.
2015-05-09 23:12:57 +00:00
dholland d1ac143f58 #if 0 code should still compile :-) 2015-05-09 22:58:22 +00:00
christos 8cde9e3d9b modernize:
- make crash() called atexit
	- use err/errx
	- remove __P
2015-05-09 21:44:47 +00:00
dholland a9ad5ddc08 Also check the other emitted getrlimit call for failure. 2015-05-09 18:48:14 +00:00
christos bb21fbff87 CID 1225082: Check getrlimit() return 2015-05-09 15:12:12 +00:00
wiz 95452ff947 Sync usage and option descriptions with manpage. 2013-12-15 09:18:31 +00:00
wiz 4b6a96229a Standardize SYNOPSIS. Sort option descriptions and remove duplicates. 2013-12-15 09:18:14 +00:00
christos 7f1aab93ea Put back the extra prototype for main(); some programs #define main to
something else, so we need the extra prototype.
2013-12-15 06:07:39 +00:00
christos 0213edf018 - remove support for pre-ansi output
- add -B (BSD) support for c++ output macros
- group functions to make output better looking
2013-12-15 00:40:17 +00:00
christos 17168f5ab4 CID 1062241: simplify free for coverity 2013-08-12 20:36:30 +00:00
joerg 2c7fa37363 Add more __dead. 2013-08-12 14:03:18 +00:00
dholland e9067f113d WARNS=5 2013-08-11 08:03:10 +00:00
joerg 8ca7e152f2 If /usr/bin/cpp is not executable and RPCGEN_CPP was not set, try
/usr/bin/clang-cpp. This allows rpcgen to work in a clang-only release
build. Document hack to be resolved when the final decision about
/usr/bin/cpp and friends is made.
2013-06-05 13:54:26 +00:00
plunky 9f61b80465 NULL does not need a cast 2011-08-31 16:24:54 +00:00
ginsbach 3cad8d1d2c Add support for hyper and quad keywords. (See Sun ONC+ Developer's Guide
and RFC-4506 for additional details.)  [From FreeBSD and OpenSolaris]
2009-05-06 14:30:51 +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
lukem f10a8652a4 fix -Wshadow issue 2009-04-13 06:42:25 +00:00
joerg 9952d3ea53 Fix markup 2009-03-11 13:57:53 +00:00
christos f3e1b062a3 indentation police. 2008-03-08 19:49:08 +00:00
christos 915f599cbf From FreeBSD via Jukka Salmi: Don't coredump on stdin. 2008-02-29 22:27:15 +00:00
hubertf 3618b9ac2c It's RPCGEN_CPP, not RPCGEN_RSH
Pointed out on tech-userlevel by Anthony Mallet <anthony.mallet@useless-ficus.net>
2008-01-19 14:22:05 +00:00
christos e451ddaaa8 - Make the msdos and non-msdos cpp handling use the same variable $RPCGEN_CPP
instead of one using $CPP and the other using $RPCGENCPP, following suit with
  RDIST_RSH, CVS_RSH, etc. and document it.
- make the msdos environment variable take precedence over path search.
2008-01-15 20:04:48 +00:00
dholland cbae618808 sizeof(char) is always 1. Conversely, however, CHAR_BIT is not always 8.
reviewed: mrg
2008-01-12 05:49:46 +00:00
mrg 6f4493cd5c xdr sucks. sprinkle some (void *) casts into it's functions taking void **,
and shut up GCC4.
2006-05-11 17:11:57 +00:00
christos cda1870a45 Coverity CID 28: Fix resource leak. 2006-04-04 21:29:42 +00:00
christos 99f1624bd3 Coverity CID 97: Remove dead code. 2006-04-04 21:27:42 +00:00
elad c080c43ef1 plug leak, coverity cid 98. 2006-03-20 17:03:08 +00:00
elad 3e7dafb547 plug leak, coverity cid 94. 2006-03-20 17:01:26 +00:00
elad 6bceef66d3 - plug leak in generate_guard()
- plug leak in h_output(), coverity cid 100
2006-03-20 16:58:13 +00:00
dsl d0ad315f4f Add (unsigned char) cast to ctype functions 2004-11-01 21:39:32 +00:00
mycroft 61290f9727 Fix function calls in the sample server to use the right function name.
From PR 4411.
2004-07-06 07:07:15 +00:00
jmc b2f782612f Completely rework how tools/compat is done. Purge all uses/references to
_NETBSD_SOURCE as this makes cross building from older/newer versions of
NetBSD harder, not easier (and also makes the resulting tools 'different')

Wrap all required code with the inclusion of nbtool_config.h, attempt to
only use POSIX code in all places (or when reasonable test w. configure and
provide definitions: ala u_int, etc).

Reviewed by lukem. Tested on FreeBSD 4.9, Redhat Linux ES3, NetBSD 1.6.2 x86
NetBSD current (x86 and amd64) and Solaris 9.

Fixes PR's: PR#17762 PR#25944
2004-06-20 22:20:14 +00:00
wiz 0b35256a71 Sort options; drop trailing space and a superfluous s. 2004-05-12 18:49:30 +00:00
christos b1f894b9cc add a 'v' flag to display a version number so that our usage matches with
everyone else's rpcgen.
2004-05-12 15:59:54 +00:00
christos 88011fdf59 One step closer to reality:
- missing flags described
- synopsis was wrong
- explain -b better
2004-05-12 15:58:12 +00:00