aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authorWolfgang Müller2022-01-17 17:22:03 +0100
committerWolfgang Müller2022-01-17 17:22:03 +0100
commitf4c384684af5bde1397e377e10e2b7e7ffd35ae4 (patch)
tree7c5976ac4ddb3b3cd801e2dd1fbc786e4846a640 /parse.y
parent16c9a10b1bee63300a3fa68cc03e08c6c693008c (diff)
downloadcwm-f4c384684af5bde1397e377e10e2b7e7ffd35ae4.tar.gz
Use PRId64 to print int64_t
The previous commit as taken from upstream introduces a compiler warning for parse.y: parse.y:110:42: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘int64_t’ Quelch this warning by using PRId64 from inttypes.h
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index 4423a2a..5920793 100644
--- a/parse.y
+++ b/parse.y
@@ -22,6 +22,7 @@
%{
#include <sys/types.h>
+#include <inttypes.h>
#include "queue.h"
#include <ctype.h>
@@ -106,7 +107,7 @@ string : string STRING {
numberstring : NUMBER {
char *s;
- if (asprintf(&s, "%lld", $1) == -1) {
+ if (asprintf(&s, "%" PRId64, $1) == -1) {
yyerror("string: asprintf");
YYERROR;
}