patches from Kamal Mostafa <kamal@whence.com> for rules and gcc 4.6.3 issues
[debian/cc1111] / debian / patches / 05_fix_format_not_a_string_literal
1 Author: Kamal Mostafa <kamal@whence.com>
2 Description: Fix instances of "format not a string literal"
3
4 Fix these, which are a warning on some gcc versions but an error on gcc 4.6.3:
5
6 libcpp/macro.c:1660:15: error: format not a string literal and no format arguments [-Werror=format-security]
7 libcpp/macro.c:1673:15: error: format not a string literal and no format arguments [-Werror=format-security]
8
9 --- cc1111-2.9.0.orig/support/cpp/libcpp/macro.c
10 +++ cc1111-2.9.0/support/cpp/libcpp/macro.c
11 @@ -1657,7 +1657,7 @@ create_iso_definition (cpp_reader *pfile
12               function-like macros, but not at the end.  */
13            if (following_paste_op)
14              {
15 -              cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
16 +              cpp_error (pfile, CPP_DL_ERROR, "%s", paste_op_error_msg);
17                return false;
18              }
19            break;
20 @@ -1670,7 +1670,7 @@ create_iso_definition (cpp_reader *pfile
21               function-like macros, but not at the beginning.  */
22            if (macro->count == 1)
23              {
24 -              cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
25 +              cpp_error (pfile, CPP_DL_ERROR, "%s", paste_op_error_msg);
26                return false;
27              }
28