Commit Graph

90470 Commits

Author SHA1 Message Date
phk
0eb6112a0e Don't rely on boolean expression evaluating to 1 or 0 by default.
Found by:       FlexeLint
2003-05-31 20:23:46 +00:00
phk
d7cb459f3c Remove unused variable(s).
Mark a non-critical memoryleak with XXX comment

Found by:       FlexeLint
2003-05-31 20:21:53 +00:00
phk
bebda81688 emove unused variable(s).
Found by:       FlexeLint
2003-05-31 20:19:13 +00:00
phk
bc9e7b689e Remove return after panic.
Found by:       FlexeLint
2003-05-31 20:18:23 +00:00
phk
11faebdb1a Remove needless return
Found by:       FlexeLint
2003-05-31 20:16:44 +00:00
phk
108e10f649 Add a couple of XXX comments where the intent is not clear.
Found by:       FlexeLint
2003-05-31 20:13:58 +00:00
phk
145891d899 Remove unused variable(s).
Remove break after goto

Found by:       FlexeLint
2003-05-31 20:11:33 +00:00
phk
d876d5ad8d Remove return after panic.
Found by:       FlexeLint
2003-05-31 20:09:42 +00:00
phk
ddccb1d287 Remove unused variable and now unbalanced call to splbio();
Found by:       FlexeLint
2003-05-31 20:09:01 +00:00
phk
0b4dbc280f Wrap macro in do {...} while(0);
Found by:       FlexeLint
2003-05-31 20:07:16 +00:00
phk
1d37bf1e98 Remove break after return.
Found by:       FlexeLint
2003-05-31 20:06:27 +00:00
phk
174a772296 Remove unsed variables.
Add explicit breaks to switch

Found by:       FlexeLint
2003-05-31 20:05:25 +00:00
phk
37e91b880a Remove unused variable.
Found by:       FlexeLint
2003-05-31 20:04:19 +00:00
phk
30d674a987 Remove unused variables.
Remove now unused pointer to ether header.
Remove break after return

Found by:       FlexeLint
2003-05-31 20:02:43 +00:00
phk
d907c0f953 Remove break after return;
Found by:       FlexeLint
2003-05-31 20:01:14 +00:00
phk
0ff6688d69 Remove break after return
Found by:       FlexeLint
2003-05-31 19:59:29 +00:00
phk
5616e3ef83 Remove unused variables.
Found by:       FlexeLint
2003-05-31 19:58:45 +00:00
phk
7525d5ae87 Remove now unused pointer to etherheader.
Found by:       FlexeLint
2003-05-31 19:56:35 +00:00
phk
34f931b00b Remove unused variable.
Found by:       FlexeLint
2003-05-31 19:56:09 +00:00
phk
d511c7fef4 Remove double return()
Found by:       FlexeLint
2003-05-31 19:55:32 +00:00
marcel
9bba923f2e Fix ia32 compat on ia64. Recent ia64 MD changes caused the garbage on
the stack to be changed in a way incompatible with elf32_map_insert()
where we used data_buf without initializing it for when the partial
mapping resulting in a misaligned image (typical when the page size
implied by the image is not the same as the page size in use by the
kernel). Since data_buf is passed by reference to vm_map_find(), the
compiler cannot warn about it.

While here, move all local variables to the top of the function.
2003-05-31 19:55:05 +00:00
phk
22c73f78e7 Prepend _ to internal union members to avoid ambiguity.
Found by:       FlexeLint
2003-05-31 19:52:15 +00:00
phk
fb8b6c2546 Remove unused variables
Found by:       FlexeLint
2003-05-31 19:51:05 +00:00
phk
016c73a70c Remove unused variables
Add /* FALLTHROUGH */

Found by:       FlexeLint
2003-05-31 19:49:49 +00:00
phk
78fe3fef1a Remove unnecessary breaks.
Remove unused variables.
Add XXX comment where a break may be missing. [lxtphy.c]

Found by:       FlexeLint
2003-05-31 19:48:33 +00:00
phk
ed097ecfc2 Move some FALLTHROUGH comments so they work.
Fix indentation error.
Make boardid string long enough.
Remove unused variable.

Found by:       FlexeLint
2003-05-31 19:46:58 +00:00
marcel
d5ebc72a62 Rough implement of makecontext() needed to support libthr.
o  Up to 8 arguments are allowed. This is the number of arguments
   passed in registers. Subsequent registers are passed on the stack.
   Trying to deal with this is not easy in C and likely forces us to
   use assembly code. Let's avoid that for now. There's no indication
   that more than 8 arguments is a strong requirement (Linux also has
   an 8 argument limit).
o  We expect that the stack base is 16-byte aligned and the stack
   size is a multiple of 16-byte. We bomb out if this is not the case.
   We probably want to be less strict by enforcing it ourselves. For
   now it's better to not hide gross alignment bogons by silently
   correcting it.
2003-05-31 19:42:51 +00:00
phk
cd37433ef9 Remove unused variable.
Remove unneeded return;

Found by:       FlexeLint
2003-05-31 19:41:33 +00:00
alc
bd43f8c10d Add vm object locking to vm_object_madvise(). 2003-05-31 19:40:57 +00:00
phk
70af1dfe88 Remove unused variables.
Found by:       FlexeLint
2003-05-31 19:40:43 +00:00
phk
30aa5fffc7 Don't define memcpy() to bcopy() and in particular not memset() to
bzero() when we have them all already.

Found by:       FlexeLint
2003-05-31 19:38:43 +00:00
phk
5ddad2e884 Fix indentation.
Found by:       FlexeLint
2003-05-31 19:38:00 +00:00
phk
dcb3c04301 Remove unused variables.
Rename struct h0h0 to g_hh01 in order to make it unique over files.

Found by:       FlexeLint
2003-05-31 19:37:21 +00:00
phk
557d80921b Remove unused variable.
Found by:       FlexeLint
2003-05-31 19:34:52 +00:00
phk
96b27507e2 Do not define memset() to bzero(). We have a memset().
Found by:       FlexeLint
2003-05-31 19:31:46 +00:00
phk
23436c40b9 Remove unused variables.
Remove #ifdef notyet which will never become.

Found by:       FlexeLint
2003-05-31 19:30:52 +00:00
phk
f0f1321766 Remove unused variable.
Remove unneeded return.

Found by:       FlexeLint
2003-05-31 19:29:38 +00:00
phk
ef00c86fce Remove unused variable.
Found by:       FlexeLint
2003-05-31 19:28:53 +00:00
phk
926fff03bf Add a destroy_geom method to the slice "library".
If a slice class has no destroy_geom method, use this one.

This should allow all slicers to kldload.
2003-05-31 19:25:05 +00:00
phk
48e54f8060 Don't use & in front of arrays.
Found by:       FlexeLint
2003-05-31 19:23:11 +00:00
phk
c48dbf1758 Remove unused variable.
Found by:       FlexeLint
2003-05-31 19:08:23 +00:00
phk
9cb1f02d71 Add /* FALLTHROUGH */
Found by:       FlexeLint
2003-05-31 19:07:22 +00:00
phk
d01756e651 We cannot use the normal strlen() and strcpy, but don't #define strlen and
strcpy to get private versions, use private versions directly.

Found by:       FlexeLint
2003-05-31 19:06:38 +00:00
phk
0b006f359f Add missing break;
Found by:       FlexeLint
2003-05-31 19:04:37 +00:00
phk
771190561c Protect macro with do { ... } while (0)
Found by:       FlexeLint
2003-05-31 19:04:07 +00:00
phk
1c8a4fd968 Remove unused variable.
Found by:       FlexeLint
2003-05-31 19:03:20 +00:00
phk
34a06ba63b Fix indentation.
Found by:       FlexeLint
2003-05-31 19:02:20 +00:00
rwatson
93d54af92b Rewrite Biba and MLS label externalization code to use sbufs instead
of C strings internally; C strings require a lot of return value
checking that (a) takes a lot of space, and (b) is difficult to get
right.  Prior to the advent of compartment support, modeling APIs
for helper functions on snprintf worked fine; with the additional
complexity, the sbuf_printf() API makes a lot more sense.

While doing this, break out the printing of sequential compartment
lists into a helper function, mac_{biba,mls}_compartment_to_string().
This permits the main body of mac_{biba,mls}_element_to_string()
to be concerned only with identifying sequential ranges rather
than rendering.

At a less disruptive moment, we'll push the move from snprintf()-like
interface to sbuf()-like interface up into the MAC Framework layer.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-05-31 19:01:44 +00:00
phk
ae05fc5265 Fix off-by-one error in range check of VC index.
Found by:       FlexeLint
2003-05-31 19:01:08 +00:00
phk
f06c9aba1b Add /* FALLTHROUGH */
Found by:       FlexeLint
2003-05-31 19:00:02 +00:00