Commit Graph

13 Commits

Author SHA1 Message Date
Enji Cooper
d511b20a69 Add HAS_TESTS to all Makefiles that are currently using the
`SUBDIR.${MK_TESTS}+= tests` idiom.

This is a follow up to r321912.
2017-08-02 08:50:42 +00:00
Enji Cooper
4b330699f8 Convert traditional ${MK_TESTS} conditional idiom for including test
directories to SUBDIR.${MK_TESTS} idiom

This is being done to pave the way for future work (and homogenity) in
^/projects/make-check-sandbox .

No functional change intended.

MFC after:	1 weeks
2017-08-02 08:35:51 +00:00
Kyle Evans
b5ddde39ac Add some basic tests for hexdump(1)'s various output flags. Formatting
tests are omitted for this initial run as there are still some bugs to work
out there.

This covers -s flag testing on devices and non-devices that would have
caught breakage found in PR 219173 as well as other subtle breakage caused
locally.

Reviewed by:	cem, ngie
Approved by:	cem (acting co-mentor)
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D11279
2017-07-13 03:52:54 +00:00
Ed Schouten
b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Johan Karlsson
aae01d2439 display.c:
- 'savech' is only used if it is set a few lines above where
	  it is used, initialize it to silence warning.

	- 'length' is either -1 or greater than 0, hence it is safe to cast it
	  to unsigned when comparing it here.

odsyntax.c:
	- 'p' is assigned either (*argvp)[0] or (*argvp)[1] which both are
	  char *. 'num' and 'end' are assigned values based on 'p'.
	  Hence use char * instead of unsigned char * for these variables.

	  '&end' as the second argument to strtoll does not need to be casted
	  to char** any more.

	  This solves a
	  'dereferencing type-punned pointer will break strict-aliasing rules'
	  warning when compiling with -O2.

parse.c:
	- 'prec' is only used when sokay == USEPREC and sokay = USEPREC
	  when 'prec' is assigned. Hence 'prec' is not used uninitialized,
	  initialize it to silence warning.

	- The code involving 'nextpr' is hard to follow, but I belive
	  'nextpr' will not be used unless it is initialized.
	  Anyway, IF 'nextpr' is used uninitialized it is better to
	  get a consistant error (seg fault, when dereferencing a NULL pointer)
	  than potentially accessing some random memory.

The above changes makes hexdump WARNS=6 clean even when compiled with
-O2. Hence bump WARNS to keep it clean.

Tested by:	CFLAGS='-O2 -pipe' make universe
2004-07-22 13:14:42 +00:00
Johan Karlsson
2345c82ea9 Revert WARNS bump until I figure out why this does not work. 2004-07-17 20:10:23 +00:00
Johan Karlsson
7eaedc0cd3 Include <string.h> to get memset and strcmp prototype.
Sort includes.

This is now WARNS=2 clean, bump WARNS to keep it clean.
2004-07-16 11:07:07 +00:00
Mark Murray
91bd71d206 Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.
2002-02-08 22:31:43 +00:00
Mark Murray
c38cc7439c WARNS=2 fixups. 2001-12-02 12:09:41 +00:00
Ruslan Ermilov
dc12be5258 MAN[1-9] -> MAN. 2001-03-27 10:52:19 +00:00
Joerg Wunsch
38d54d33e4 Now that we've already got "hexdump -C", make calling the command "hd"
having the same effect, and install a link for this.  There is
historic precedence for the command hd(1) (with roughly that output
format) in Xenix, SCO, and a few SysV's that tooks the idea.

Also, added a couple of spaces to the -C format to make the output
better readable.

Ok'ed by: phk
1996-09-29 04:17:24 +00:00
Jordan K. Hubbard
2c6983854a Change .0 man extents to .1, as reported by Julian Elischer. Whoops,
thought I'd gotten this one the first time around.
Reviewed by:
Submitted by:
1994-08-13 05:00:39 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00