Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Sep 2004 04:38:28 +0200 (CEST)
From:      Dan Lukes <dan@obluda.cz>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/71628: [PATCH] cleanup of the usr.sbin/rpcbind code
Message-ID:  <200409120238.i8C2cSBc007116@kulesh.obluda.cz>
Resent-Message-ID: <200409120240.i8C2eTF7087113@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         71628
>Category:       bin
>Synopsis:       [PATCH] cleanup of the usr.sbin/rpcbind code
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 12 02:40:28 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Dan Lukes
>Release:        FreeBSD 5.3-BETA3 i386
>Organization:
Obludarium
>Environment:
System: FreeBSD kulesh.obluda.cz 5.3-BETA3 FreeBSD 5.3-BETA3 #8: Sun Sep 5 07:06:40 CEST 2004 dan@kulesh.obluda.cz:/usr/obj/usr/src/sys/Dan i386
$FreeBSD: usr.sbin/rpcbind/rpcbind.c,v 1.13 2004/08/16 00:20:31 mbr

>Description:
	There are more than 5000 warnings issued during "make buildworld".
Some of them are false positives, but some of them are sign of true errors.

	Nobody is upset by warnings due it's amount, so some errors remain
uncorrected.

	I want to cleanup the code-base from warnings, so warnings will
become "attention mark" again.

usr.sbin/rpcbind/rpcbind.c:239: warning: 'fd' might be used uninitialized in this function
usr.sbin/rpcbind/rpcbind.c:243: warning: 'my_xprt' might be used uninitialized in this function
both variables are initialized before use with no exception

>How-To-Repeat:
	N/A
>Fix:
*** usr.sbin/rpcbind/rpcbind.c.ORIG	Sun Aug 22 11:12:23 2004
--- usr.sbin/rpcbind/rpcbind.c	Sat Sep 11 10:19:50 2004
***************
*** 236,247 ****
  static int
  init_transport(struct netconfig *nconf)
  {
! 	int fd;
  	struct t_bind taddr;
  	struct addrinfo hints, *res = NULL;
  	struct __rpc_sockinfo si;
! 	SVCXPRT	*my_xprt;
  	int status;	/* bound checking ? */
  	int aicode;
  	int addrlen;
  	int nhostsbak;
--- 236,247 ----
  static int
  init_transport(struct netconfig *nconf)
  {
! 	int fd = fd;  /* init to suppres "may be used uninitialized" warning */
  	struct t_bind taddr;
  	struct addrinfo hints, *res = NULL;
  	struct __rpc_sockinfo si;
! 	SVCXPRT	*my_xprt = my_xprt; /* init to suppres "may be used uninitialized" warning */
  	int status;	/* bound checking ? */
  	int aicode;
  	int addrlen;
  	int nhostsbak;
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409120238.i8C2cSBc007116>