Project

General

Profile

Bug #2039

several declarations in uts declare functions with variable number of args even if they are not

Added by Milan Jurik about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Low
Assignee:
Category:
kernel
Start date:
2012-01-27
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:

Description

In many files in kernel there are function declarations for functions defined in different files but the declarations are incomplete - they have no specified args, so compiler see them as function with variable number of args. That could be source of bugs potentially.


Files

lint-incomplete.patch (49.5 KB) lint-incomplete.patch suggested fix Milan Jurik, 2012-02-03 07:48 PM

History

#1

Updated by Rich Lowe about 8 years ago

If you're fixing bugs like this you should:

Edit usr/src/tools/cw/cw.c and remove the forced -Wno-implicit-function-declaration

Run builds.

the kernel is fine, but a lot of other code is missing includes, and thus has the same problems (no type checking of arguments, of arity, of anything).

Just focusing on the bits of code you care most about would help a lot (say, uts/ and lib/, presuming that the ancient code in cmd/ is the primary, shocking, offender).

#2

Updated by Milan Jurik about 8 years ago

I need to do clean up step-by-step here and as I would like to use the latest greatest lint in my CBE, lint reports have priority for me now.

I know illumos cw hides lots of gcc warnings which would be nice to clean up but that is work for few next years, I cannot do all in the first 2 months :-)

#3

Updated by Milan Jurik about 8 years ago

#4

Updated by Rich Lowe about 8 years ago

  • Category set to kernel
  • Status changed from In Progress to Resolved

Resolved in r13592 commit:d4e1700ca091

Also available in: Atom PDF