Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 2009 10:01:03 GMT
From:      Robert Watson <rwatson@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 157587 for review
Message-ID:  <200902121001.n1CA13Ch012451@repoman.freebsd.org>

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

Change 157587 by rwatson@rwatson_cinnamon on 2009/02/12 10:00:55

	Fix warning building on 32-bit FreeBSD systems: cast size_t to
	uintmax_t and use %ju for scanf.

Affected files ...

.. //depot/projects/trustedbsd/openbsm/libbsm/bsm_control.c#28 edit

Differences ...

==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_control.c#28 (text+ko) ====

@@ -27,7 +27,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_control.c#27 $
+ * $P4: //depot/projects/trustedbsd/openbsm/libbsm/bsm_control.c#28 $
  */
 
 #include <config/config.h>
@@ -437,7 +437,7 @@
 	while (*str == ' ' || *str == '\t')
 		str++;
 
-	nparsed = sscanf(str, "%lu%c", &val, &mult);
+	nparsed = sscanf(str, "%ju%c", (uintmax_t *)&val, &mult);
 
 	switch (nparsed) {
 	case 1:



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