Hello,

This patch fixes a format warning on systems where int64_t is
defined as long rather than long long.

The current "%lld" format in parse.y does not match int64_t on
such systems. Using PRId64 makes the format portable without
changing the generated configuration text.

The patch was tested by building cwm on Linux with GCC. It applies
cleanly to the current Xenocara cwm source.

--
Regards
r1w1s1
--- a/parse.y
+++ b/parse.y
@@ -22,6 +22,7 @@
 %{
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <sys/queue.h>
 
 #include <ctype.h>
@@ -106,7 +107,7 @@
 
 numberstring	: NUMBER				{
 			char	*s;
-			if (asprintf(&s, "%lld", $1) == -1) {
+			if (asprintf(&s, "%" PRId64, $1) == -1) {
 				yyerror("string: asprintf");
 				YYERROR;
 			}

Reply via email to