Project

General

Profile

Actions

Bug #16253

closed

ypcmd: type of parameter defaults to 'int'

Added by Toomas Soome 12 days ago. Updated 7 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:

    ypmatch.c: In function 'main':
    ypmatch.c:97:1: error: type of 'argc' defaults to 'int' [-Werror=implicit-int]
       97 | main(argc, argv)
          | ^~~~
    cc1: all warnings being treated as errors

And while there, use vfprintf().

Testing done: wsdiff does show binary difference in ypxfr.o (logprintf(), as expected) and in resulting ypxfr program.


Files

report.txt (729 KB) report.txt Toomas Soome, 2024-02-14 01:55 PM
Actions #1

Updated by Electric Monk 12 days ago

  • Gerrit CR set to 3270
Actions #2

Updated by Toomas Soome 8 days ago

Actions #3

Updated by Robert Mustacchi 7 days ago

To help build a little bit of additional confidence here with ypxfr and the logging changes I rigged up a quick test. I touched the file /var/yp/ypxfr.log as root to ensure it existed and then ran ypxfr -h > a which will cause the logging to go to the file. And if we check it:

rm@beowulf:/var/yp$ cat ypxfr.log 
Wed Feb 14 19:17:37: Usage:
ypxfr [-f] [ -h host ] [ -d domainname ]
        [ -s domainname ] [-c] [-C tid prot servname ] map

where
        -f forces transfer even if the master's copy is not newer.
        host is the server from where the map should be transfered
        -d domainname is specified if other than the default domain
        -s domainname is a source for the map that is same across domains
        -c inhibits sending a "Clear map" message to the local ypserv.
        -C is for use only by ypserv to pass callback information.

It did.

Actions #4

Updated by Electric Monk 7 days ago

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

git commit f83283b9d06eebbe79e4498a7c7f66d8fb39111d

commit  f83283b9d06eebbe79e4498a7c7f66d8fb39111d
Author: Toomas Soome <tsoome@me.com>
Date:   2024-02-14T22:03:37.000Z

    16253 ypcmd: type of parameter defaults to 'int'
    Reviewed by: Jason King <jason.brian.king+illumos@gmail.com>
    Reviewed by: Dan Cross <cross@oxidecomputer.com>
    Reviewed by: Bill Sommerfeld <sommerfeld@hamachi.org>
    Approved by: Robert Mustacchi <rm@fingolfin.org>

Actions

Also available in: Atom PDF