[PATCH xts] xts5: Fix format specifier type warning in XtSetSelectionTimeout

Rhys Kidd rhyskidd at gmail.com
Sat Oct 29 03:04:43 UTC 2016


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 at 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



More information about the xorg-devel mailing list