explicitly specify integer size in numberstring

This commit is contained in:
Grigory Kirillov 2022-11-23 16:28:42 +03:00
parent 481894147a
commit 42bc0412e3

View File

@ -22,6 +22,7 @@
%{ %{
#include <sys/types.h> #include <sys/types.h>
#include <inttypes.h>
#include "queue.h" #include "queue.h"
#include <ctype.h> #include <ctype.h>
@ -108,7 +109,7 @@ string : string STRING {
numberstring : NUMBER { numberstring : NUMBER {
char *s; char *s;
if (asprintf(&s, "%lld", $1) == -1) { if (asprintf(&s, "%" PRId64, $1) == -1) {
yyerror("string: asprintf"); yyerror("string: asprintf");
YYERROR; YYERROR;
} }