Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 Apr 2008 14:19:22 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 140295 for review
Message-ID:  <200804201419.m3KEJMCl039243@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=140295

Change 140295 by hselasky@hselasky_laptop001 on 2008/04/20 14:18:21

	
	Fix compiler warning.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/ucom.c#30 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/ucom.c#30 (text+ko) ====

@@ -205,8 +205,6 @@
 			ucom_bitmap[x / 8] |= (1 << (x % 8));
 		}
 
-		*p_root_unit = n;
-
 		error = 0;
 
 		break;
@@ -216,6 +214,12 @@
 
 	mtx_unlock(&Giant);
 
+	/*
+	 * Always set the variable pointed to by "p_root_unit" so that
+	 * the compiler does not think that it is used uninitialised:
+	 */
+	*p_root_unit = n;
+
 	return (error);
 }
 



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