Add missing specifier in format string

This commit is contained in:
jasper 2020-04-23 08:36:11 +00:00
parent 75bb50423a
commit dee0f91b0d
2 changed files with 40 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.17 2020/01/26 11:14:32 jasper Exp $
# $OpenBSD: Makefile,v 1.18 2020/04/23 08:36:11 jasper Exp $
COMMENT= lightweight scripting language with C-like syntax
DISTNAME= arena-0.9.13
REVISION= 3
REVISION= 4
CATEGORIES= lang
# BSD

View File

@ -0,0 +1,38 @@
$OpenBSD: patch-libparser_expr_dump_c,v 1.1 2020/04/23 08:36:11 jasper Exp $
Add missing specifier in format string.
Index: libparser/expr_dump.c
--- libparser/expr_dump.c.orig
+++ libparser/expr_dump.c
@@ -263,7 +263,7 @@ void expr_dump(expr *ex)
parenthesis(ex, ex->inner, 1);
break;
case EXPR_ASSIGN_ARRAY:
- printf(ex->name);
+ printf("%s", ex->name);
expr_dump_index(ex->argc, ex->argv);
printf(" = ");
parenthesis(ex, ex->inner, 1);
@@ -294,10 +294,10 @@ void expr_dump(expr *ex)
printf(")");
break;
case EXPR_REF:
- printf(ex->name);
+ printf("%s", ex->name);
break;
case EXPR_REF_ARRAY:
- printf(ex->name);
+ printf("%s", ex->name);
expr_dump_index(ex->argc, ex->argv);
break;
case EXPR_INDEX:
@@ -316,7 +316,7 @@ void expr_dump(expr *ex)
case EXPR_CONST_BOOL:
case EXPR_CONST_INT:
case EXPR_CONST_FLOAT:
- printf(ex->name);
+ printf("%s", ex->name);
break;
case EXPR_CONST_STRING:
printf("\"%s\"", ex->name);