Michael Tuexen
5dc6a81580
Address warnings found by clang.
...
MFC after: 3 months.
2011-12-17 14:55:19 +00:00
Dimitry Andric
7853817de3
More fixes for correct printf length modifiers usr.bin/gprof.
...
MFC after: 1 week
2011-12-17 14:51:24 +00:00
Dimitry Andric
d16752d1ae
In usr.bin/gprof/aout.c, use the correct printf length modifier for a
...
uint32_t.
MFC after: 1 week
2011-12-17 14:37:41 +00:00
Dimitry Andric
8f04da68ad
In contrib/ee/ee.c, fix a few warnings about format strings not being
...
literals. Also, change the direction argument to move_rel() from char
to int; K&R function definions cause it to be promoted to an int anyway,
and this way we avoid clang warning about it.
MFC after: 1 week
2011-12-17 14:26:16 +00:00
Dimitry Andric
f666b9058d
In usr.bin/csup/proto.c, use the correct printf length modifier to print
...
an off_t.
MFC after: 1 week
2011-12-17 13:52:53 +00:00
Dimitry Andric
582ad8aebf
In usr.bin/csup/auth.c, use the correct number of bytes for zeroing the
...
shared secret, and use long long format to snprintf a time_t.
MFC after: 1 week
2011-12-17 13:14:44 +00:00
Dimitry Andric
586f63035f
In contrib/bzip2/bzip2recover.c, use the correct printf length modifier
...
for unsigned long long.
MFC after: 1 week
2011-12-17 12:52:58 +00:00
Bjoern A. Zeeb
1e629ba90f
Adter r228571 unbreak architectures with strict alignment rules
...
by copying rather than casting.
2011-12-17 11:06:22 +00:00
Bernhard Schmidt
5a8801b0ea
Remove now redundant mac argument.
...
Discussed with: adrian@
2011-12-17 10:32:31 +00:00
Bernhard Schmidt
fcd9500f91
Fix some net80211 enum nits:
...
- ic_vap_create() uses an ieee80211_opmode argument
- ieee80211_rate2media() takes an ieee80211_phymode argument
- ieee80211_plcp2rate() takes an ieee80211_phytype argument
- cast to enum ieee80211_protmode and ieee80211_roamingmode to silence
compiler warnings
Submitted by: arundel@
2011-12-17 10:23:17 +00:00
Ruslan Ermilov
e9a2004460
Fixed some of markup.
...
Reviewed by: jhb
2011-12-17 06:57:35 +00:00
Dimitry Andric
f3fbaba136
In usr.bin/mt/mt.c, the c_code member of struct commands should really
...
be an unsigned long, since it will contain values of ioctl request
codes. On 64-bit arches, these will not fit into an int.
MFC after: 1 week
2011-12-17 02:23:30 +00:00
Dimitry Andric
b884d5e84a
In sbin/devd/devd.h, 'event_proc' and 'eps' are declared as structs. In
...
devd.hh, there are redeclared as classes. Fix the inconsistency.
MFC after: 1 week
2011-12-17 01:54:51 +00:00
Dimitry Andric
9b9c36a3b5
Disable yet another clang warning when WARNS <= 3.
...
MFC after: 1 week
2011-12-17 01:51:12 +00:00
Dimitry Andric
940695fffb
In usr.bin/tar/tree.c, if you really want to poke to NULL, you must use
...
volatile, otherwise the indirection will not be emitted.
MFC after: 1 week
2011-12-17 01:36:50 +00:00
Dimitry Andric
7824741286
In sbin/dhclient, since we know the size of the source strings anyway,
...
we might as well use memcpy; strlcpy is really unnecessary here.
MFC after: 1 week
2011-12-17 01:29:46 +00:00
Dimitry Andric
e2f95dd941
In sbin/dhclient, work around warnings about the size argument to
...
strlcpy appearing to be the size of the source buffer, instead of the
destination.
MFC after: 1 week
2011-12-17 01:19:07 +00:00
Dimitry Andric
650fd1e4e4
Use both NO_WFORMAT and NO_WARRAY_BOUNDS for sbin/ipf, it would be too
...
disruptive to actually fix all the warnings, and the code hasn't been
maintained for several years.
MFC after: 1 week
2011-12-17 00:54:09 +00:00
Dimitry Andric
5323d72245
In sbin/atm/atmconfig/diag.c, fix a few warnings about format strings
...
not being literals.
MFC after: 1 week
2011-12-17 00:26:45 +00:00
Dimitry Andric
c0a8e7ad42
Use NO_WCAST_ALIGN for sbin/gbde, this is more appropriate to fix the
...
alignment warnings than using WARNS=3, and it also works for clang.
MFC after: 1 week
2011-12-17 00:14:40 +00:00
Nathan Whitehorn
e347e23bfe
Allow this to work on embedded systems without Open Firmware by making
...
lack of a /chosen non-fatal, and manually removing memory in use by the
kernel from the physical memory map.
Submitted by: rpaulo
2011-12-16 23:46:05 +00:00
Dimitry Andric
1ff68ea3a0
Use NO_WARRAY_BOUNDS for sbin/routed/rtquery.
...
MFC after: 1 week
2011-12-16 23:43:58 +00:00
Dimitry Andric
c9009f9f3d
Add a NO_WARRAY_BOUNDS setting to bsd.sys.mk, only applicable to clang,
...
to selectively work around warnings in programs that don't use flexible
array members, but instead define arrays of length 1 at the end of the
struct, and then access those beyond their declared bounds.
MFC after: 1 week
2011-12-16 23:42:25 +00:00
Nathan Whitehorn
b059c637fb
Zero BSS on start, in case the ELF loader that started the kernel did not
...
do this for us. This can happen on some embedded systems.
Submitted by: rpaulo
2011-12-16 23:40:56 +00:00
Dimitry Andric
cf87966cfd
In contrib/gperf/src/output.cc, use the correct printf length modifier
...
for a ptrdiff_t.
MFC after: 1 week
2011-12-16 23:15:11 +00:00
Dimitry Andric
9733a9e463
In sbin/fsdb/fsdbutil.c, work around a clang false positive with printf
...
format warnings and conditional operators. (See LLVM PR 11313 for more
information.)
MFC after: 1 week
2011-12-16 23:09:31 +00:00
Dimitry Andric
8fec2463ca
In sbin/camcontrol/camcontrol.c, fix a few warnings about format strings
...
not being literals.
MFC after: 1 week
2011-12-16 22:35:19 +00:00
Dimitry Andric
6aff93296d
Define YY_NO_INPUT when building libbinutils, to prevent warnings about
...
unused input() functions emitted by lex.
MFC after: 1 week
2011-12-16 22:19:13 +00:00
Dimitry Andric
3eb9425c95
Fix the incompatible enum conversions in libexec/ypxfr in another, more
...
messy way, so as to not disrupt other yp programs: just add casts to
convert the incompatible enums, as the numerical values are the same
(either by accident, design, or the phase of the moon at that time).
MFC after: 1 week
2011-12-16 22:05:10 +00:00
Dimitry Andric
db83a39193
Revert r228592, as the non-messy way of fixing ypxfr breaks other yp
...
programs (e.g. usr.sbin/rpc.yppasswdd).
Spotted by: np
MFC after: 1 week
2011-12-16 21:57:44 +00:00
Dimitry Andric
1dcc79e3e8
In cddl/contrib/opensolaris/cmd/dtrace/dtrace.c, fix some obtuse
...
snprintf tricks.
MFC after: 1 week
2011-12-16 21:48:09 +00:00
Dimitry Andric
1e02cf9b8c
In cddl/contrib/opensolaris/tools/ctf/cvt/ctfmerge.c, a size_t is passed
...
to fprintf as a field width. It should be an int instead, so cast it.
MFC after: 1 week
2011-12-16 21:29:46 +00:00
Dimitry Andric
139df251d9
In games/factor/factor.c, fix a warning about a format string not being
...
a literal.
MFC after: 1 week
2011-12-16 21:24:11 +00:00
Dimitry Andric
4bfc2007ab
Fix some obtuse fprintf tricks in bin/ed.
...
MFC after: 1 week
2011-12-16 21:12:23 +00:00
Navdeep Parhar
7be5be337a
Catch up with new driver ioctls in cxgbe.
...
MFC after: 1 month
2011-12-16 20:38:22 +00:00
John Baldwin
f427c78b19
Fire a kevent if necessary after seeking on a regular file. This fixes a
...
case where a kevent would not fire on a regular file if an application read
to EOF and then seeked backwards into the file.
Reviewed by: kib
MFC after: 2 weeks
2011-12-16 20:10:00 +00:00
Dimitry Andric
8f553bfb27
Attempt to fix the numerous incompatible enum conversions in
...
libexec/ypxfr in the least disruptive way.
MFC after: 1 week
2011-12-16 19:39:49 +00:00
Dimitry Andric
9e277ed8bf
Fix typos in the comments about clang warnings in several
...
sendmail-related Makefiles.
Spotted by: arundel
MFC after: 1 week
2011-12-16 17:02:25 +00:00
Dimitry Andric
1f8811efbc
In contrib/telnet/telnetd/utility.c, fix a few warnings about format
...
strings not being literals.
MFC after: 1 week
2011-12-16 16:53:54 +00:00
Dimitry Andric
ff3879a34a
Unfortunately, clang gives warnings about sendmail code that cannot be
...
turned off yet. Since this is contrib code, and we don't really care
about the warnings, just turn make them non-fatal for now.
MFC after: 1 week
2011-12-16 16:32:08 +00:00
Dimitry Andric
2f3739b852
In libexec/rbootd/utils.c, use the correct printf length modifiers for
...
u_int32_t and size_t.
MFC after: 1 week
2011-12-16 16:29:51 +00:00
Dimitry Andric
789732b939
In libexec/pppoed/pppoed.c, use the correct printf length modifier for a
...
size_t.
MFC after: 1 week
2011-12-16 16:07:39 +00:00
Dimitry Andric
4df50ce813
Unfortunately, clang gives warnings about sendmail code that cannot be
...
turned off yet. Since this is contrib code, and we don't really care
about the warnings, just turn make them non-fatal for now.
MFC after: 1 week
2011-12-16 15:58:38 +00:00
Dimitry Andric
747a8c81c7
In libexec/bootpd/tools/bootptest/print-bootp.c, use the correct printf
...
length modifier for the difference between two pointers.
MFC after: 1 week
2011-12-16 15:55:43 +00:00
Pedro F. Giffuni
5ed5554f0a
Style cleanups by jh@.
...
Fix a comment from the previous commit.
Use M_ZERO instead of bzero() in ext2_vfsops.c
Add include guards from PR.
PR: 162564
Approved by: jhb (mentor)
MFC after: 2 weeks
2011-12-16 15:47:43 +00:00
Dimitry Andric
50541c922e
In libexec/getty/chat.c, replace && with & in chat_send(). The intent
...
is to test if the CHATDEBUG_SEND bit is set in the chat_debug global.
MFC after: 1 week
2011-12-16 15:44:12 +00:00
Dimitry Andric
5d0ce6a552
In libexec/bootpd/bootpgw/bootpgw.c, add a cast for the remaining
...
minutes of activity, to avoid a warning on platforms where time_t is a
32-bit integer.
MFC after: 1 week
2011-12-16 15:38:11 +00:00
Dimitry Andric
edf500a77a
In cddl/contrib/opensolaris/lib/libdtrace/common/dt_handle.c, some
...
uint64_t values are snprintf'd using %llx. On amd64, uint64_t is
typedef'd as unsigned long, so cast the values to u_longlong_t, as is
done similarly in the rest of the file.
MFC after: 1 week
2011-12-16 15:12:42 +00:00
Dimitry Andric
8ac4e8ebc3
In cddl/contrib/opensolaris/lib/libdtrace/common/dt_consume.c, some
...
uint64_t values are snprintf'd using %llx. On amd64, uint64_t is
typedef'd as unsigned long, so cast the values to u_longlong_t, as is
done similarly in the rest of the file.
MFC after: 1 week
2011-12-16 15:04:47 +00:00
Dimitry Andric
7be5a1fbf4
In lib/libthread_db/arch/i386/libpthread_md.c, clang gives two incorrect
...
warnings about alignment, so turn -Wcast-align off for now.
MFC after: 1 week
2011-12-16 15:00:56 +00:00