[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] Add "%s" as the format string to the fprintf call in pkl_pri
From: |
Dan Čermák |
Subject: |
[PATCH 1/2] Add "%s" as the format string to the fprintf call in pkl_print_type() |
Date: |
Wed, 11 Dec 2019 23:46:04 +0100 |
From: Dan Čermák <address@hidden>
This fixes compilation errors with -Werror=format-security, as
PKL_AST_IDENTIFIER_POINTER (PKL_AST_TYPE_NAME (type))
is not a string literal.
---
src/pkl-ast.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pkl-ast.c b/src/pkl-ast.c
index 4d790f6..917d0a8 100644
--- a/src/pkl-ast.c
+++ b/src/pkl-ast.c
@@ -974,7 +974,7 @@ pkl_print_type (FILE *out, pkl_ast_node type, int
use_given_name)
if (use_given_name
&& PKL_AST_TYPE_NAME (type))
{
- fprintf (out,
+ fprintf (out, "%s",
PKL_AST_IDENTIFIER_POINTER (PKL_AST_TYPE_NAME (type)));
return;
}
--
2.24.0
- [PATCH 1/2] Add "%s" as the format string to the fprintf call in pkl_print_type(),
Dan Čermák <=