Project

General

Profile

Actions

Bug #16260

closed

in.rdisc: type of 'a' defaults to 'int'

Added by Toomas Soome 12 days ago. Updated 6 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
cmd - userland programs
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Build errors with modern options:

    in.rdisc.c: In function 'logerr':
    in.rdisc.c:2238:1: error: type of 'a' defaults to 'int' [-Werror=implicit-int]
     2238 | logerr(fmt, a, b, c, d, e, f, g, h)
          | ^~~~~~
    in.rdisc.c:2238:1: error: type of 'b' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2238:1: error: type of 'c' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2238:1: error: type of 'd' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2238:1: error: type of 'e' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2238:1: error: type of 'f' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2238:1: error: type of 'g' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2238:1: error: type of 'h' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c: In function 'logtrace':
    in.rdisc.c:2249:1: error: type of 'a' defaults to 'int' [-Werror=implicit-int]
     2249 | logtrace(fmt, a, b, c, d, e, f, g, h)
          | ^~~~~~~~
    in.rdisc.c:2249:1: error: type of 'b' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2249:1: error: type of 'c' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2249:1: error: type of 'd' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2249:1: error: type of 'e' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2249:1: error: type of 'f' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2249:1: error: type of 'g' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2249:1: error: type of 'h' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c: In function 'logdebug':
    in.rdisc.c:2260:1: error: type of 'a' defaults to 'int' [-Werror=implicit-int]
     2260 | logdebug(fmt, a, b, c, d, e, f, g, h)
          | ^~~~~~~~
    in.rdisc.c:2260:1: error: type of 'b' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2260:1: error: type of 'c' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2260:1: error: type of 'd' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2260:1: error: type of 'e' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2260:1: error: type of 'f' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2260:1: error: type of 'g' defaults to 'int' [-Werror=implicit-int]
    in.rdisc.c:2260:1: error: type of 'h' defaults to 'int' [-Werror=implicit-int]
    cc1: all warnings being treated as errors

Testing done: wsdiff does report change of constants in final binary and diff in logimpl() (as expected).


Files

report.txt (314 KB) report.txt Toomas Soome, 2024-02-14 02:06 PM
Actions #1

Updated by Electric Monk 12 days ago

  • Gerrit CR set to 3277
Actions #2

Updated by Toomas Soome 8 days ago

Actions #3

Updated by Toomas Soome 6 days ago

Toomas Soome wrote:

Build errors with modern options:
[...]

Testing done: wsdiff does report change of constants in final binary and diff in logimpl() (as expected).

Also done simple test to get error log:

tsoome@beastie:/code/16260/usr/src/cmd/cmd-inet/usr.sbin/in.rdisc$  ./in.rdisc 256.10.13.2
tsoome@beastie:/code/16260/usr/src/cmd/cmd-inet/usr.sbin/in.rdisc$  ./in.rdisc 10.0.0.1s

tsoome@beastie:/code/16260/usr/src/cmd/cmd-inet/usr.sbin/in.rdisc$ tail /var/adm/messages
Feb 16 00:06:34 beastie in.rdisc[18174]: [ID 403679 daemon.error] in.rdisc: bad address 256.10.13.2
Feb 16 00:10:06 beastie in.rdisc[18192]: [ID 403679 daemon.error] in.rdisc: bad address 10.0.0.1s

Actions #4

Updated by Electric Monk 6 days ago

  • Status changed from Pending RTI to Closed
  • % Done changed from 90 to 100

git commit 22e441cb5a2aa1a5133ed91ed4f8cfb95bed3c09

commit  22e441cb5a2aa1a5133ed91ed4f8cfb95bed3c09
Author: Toomas Soome <tsoome@me.com>
Date:   2024-02-15T22:51:47.000Z

    16260 in.rdisc: type of 'a' defaults to 'int'
    Reviewed by: Dan Cross <cross@oxidecomputer.com>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF