[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xorg-devel
Subject:    [PATCH xts] xts5: Fix format specifier type warning in XtSetSelectionTimeout
From:       Rhys Kidd <rhyskidd () gmail ! com>
Date:       2016-10-29 3:04:43
Message-ID: 20161029030443.5508-1-rhyskidd () gmail ! com
[Download RAW message or body]

XtSetSelectionTimeout.c: In function:
XtSetSelectionTimeout.c:90:3: warning: format '%d' expects argument of type 'int', \
but argument 3 has type 'long unsigned int' [-Wformat=]  sprintf(ebuf, "ERROR: \
Expected 5000 received %d", value_good);  ^
XtSetSelectionTimeout.c:98:3: warning: format '%d' expects argument of type 'int', \
but argument 3 has type 'long unsigned int' [-Wformat=]  sprintf(ebuf, "ERROR: \
Expected 10000 received %d", value_good);  ^

Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
---
 xts5/XtC/XtSetSelectionTimeout.m | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xts5/XtC/XtSetSelectionTimeout.m b/xts5/XtC/XtSetSelectionTimeout.m
index dbaf75c..4e97513 100644
--- a/xts5/XtC/XtSetSelectionTimeout.m
+++ b/xts5/XtC/XtSetSelectionTimeout.m
@@ -81,7 +81,7 @@ pid_t pid2;
 	XtRealizeWidget(topLevel);
 	tet_infoline("TEST: Verify the default");
 	if ((value_good = XtGetSelectionTimeout()) != (unsigned int)5000){
-		sprintf(ebuf, "ERROR: Expected 5000 received %d", value_good);
+		sprintf(ebuf, "ERROR: Expected 5000 received %lu", value_good);
 		tet_infoline(ebuf);
 		tet_result(TET_FAIL);
 	}
@@ -89,7 +89,7 @@ pid_t pid2;
 	XtSetSelectionTimeout((unsigned int )10000);
 	tet_infoline("TEST: selectionTimeout is 10000 milliseconds");
 	if ((value_good = XtGetSelectionTimeout()) != (unsigned int)10000){
-		sprintf(ebuf, "ERROR: Expected 10000 received %d", value_good);
+		sprintf(ebuf, "ERROR: Expected 10000 received %lu", value_good);
 		tet_infoline(ebuf);
 		tet_result(TET_FAIL);
 	}
-- 
2.9.3

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic