bin/71615: [PATCH] cleanup of the usr.sbin/usbd code

Dan Lukes dan at obluda.cz
Sat Sep 11 19:40:23 PDT 2004


>Number:         71615
>Category:       bin
>Synopsis:       [PATCH] cleanup of the usr.sbin/usbd 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:22 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 at kulesh.obluda.cz:/usr/obj/usr/src/sys/Dan i386
$FreeBSD: src/usr.sbin/usbd/usbd.c,v 1.29 2003/10/25 22:03:10 jmg

>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/usbd/usbd.c:588: warning: long int format, time_t arg (arg 2)
usr.sbin/usbd/usbd.c:610: warning: int format, pointer arg (arg 2)
usr.sbin/usbd/usbd.c:615: warning: unsigned int format, pointer arg (arg 2)
usr.sbin/usbd/usbd.c:615: warning: char format, different type arg (arg 3)

>How-To-Repeat:
	N/A
>Fix:
*** usr.sbin/usbd/usbd.c.ORIG	Sun Sep  5 18:40:34 2004
--- usr.sbin/usbd/usbd.c	Sun Sep  5 18:51:23 2004
***************
*** 584,590 ****
  		devinfo = &event->u.ue_device;
  
  		printf(" at %ld.%09ld, %s, %s:\n",
! 			timespec->tv_sec, timespec->tv_nsec,
  			devinfo->udi_product, devinfo->udi_vendor);
  
  		printf("  vndr=0x%04x prdct=0x%04x rlse=0x%04x "
--- 584,590 ----
  		devinfo = &event->u.ue_device;
  
  		printf(" at %ld.%09ld, %s, %s:\n",
! 			(long int)timespec->tv_sec, timespec->tv_nsec,
  			devinfo->udi_product, devinfo->udi_vendor);
  
  		printf("  vndr=0x%04x prdct=0x%04x rlse=0x%04x "
***************
*** 607,618 ****
  		}
  	} else if (event->ue_type == USB_EVENT_CTRLR_ATTACH ||
  	    event->ue_type == USB_EVENT_CTRLR_DETACH) {
! 		printf(" bus=%d", &event->u.ue_ctrlr.ue_bus);
  	} else if (event->ue_type == USB_EVENT_DRIVER_ATTACH ||
  	    event->ue_type == USB_EVENT_DRIVER_DETACH) {
  		printf(" cookie=%u devname=%s",
! 		    &event->u.ue_driver.ue_cookie.cookie,
! 		    &event->u.ue_driver.ue_devname);
  	}
  	printf("\n");
  }
--- 607,618 ----
  		}
  	} else if (event->ue_type == USB_EVENT_CTRLR_ATTACH ||
  	    event->ue_type == USB_EVENT_CTRLR_DETACH) {
! 		printf(" bus=%d", event->u.ue_ctrlr.ue_bus);
  	} else if (event->ue_type == USB_EVENT_DRIVER_ATTACH ||
  	    event->ue_type == USB_EVENT_DRIVER_DETACH) {
  		printf(" cookie=%u devname=%s",
! 		    event->u.ue_driver.ue_cookie.cookie,
! 		    event->u.ue_driver.ue_devname);
  	}
  	printf("\n");
  }
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list