diff mbox

validation: odp_init_log: fix clang format string error

Message ID 1424453231-28250-1-git-send-email-mike.holmes@linaro.org
State Superseded
Headers show

Commit Message

Mike Holmes Feb. 20, 2015, 5:27 p.m. UTC
odp_init_log.c:75:23: error: format string is not a string literal
      [-Werror,-Wformat-nonliteral]
        r = vfprintf(stderr, fmt, args);

Fixes https://bugs.linaro.org/show_bug.cgi?id=1248

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---

Depends on "api: hints: add printf format attribute"


 test/validation/odp_init_log.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Taras Kondratiuk Feb. 24, 2015, 10:06 a.m. UTC | #1
On 02/20/2015 07:27 PM, Mike Holmes wrote:
> odp_init_log.c:75:23: error: format string is not a string literal
>       [-Werror,-Wformat-nonliteral]
>         r = vfprintf(stderr, fmt, args);
> 
> Fixes https://bugs.linaro.org/show_bug.cgi?id=1248
> 
> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>

I'll repost this patch with its dependency in one series.
Taras Kondratiuk Feb. 24, 2015, 10:27 a.m. UTC | #2
v2: No code change. Updated commit messages and grouped dependent
    patches together.

Mike Holmes (1):
  validation: odp_init_log: fix clang format string error

Taras Kondratiuk (2):
  api: hints: add printf format attribute
  linux-generic: weak: fix -Wformat-nonliteral warning

 include/odp/api/hints.h           | 5 +++++
 platform/linux-generic/odp_weak.c | 4 ++--
 test/validation/odp_init_log.c    | 1 +
 3 files changed, 8 insertions(+), 2 deletions(-)
Maxim Uvarov Feb. 25, 2015, 1:25 p.m. UTC | #3
Merged,
Maxim.

On 02/24/2015 01:27 PM, Taras Kondratiuk wrote:
> v2: No code change. Updated commit messages and grouped dependent
>      patches together.
>
> Mike Holmes (1):
>    validation: odp_init_log: fix clang format string error
>
> Taras Kondratiuk (2):
>    api: hints: add printf format attribute
>    linux-generic: weak: fix -Wformat-nonliteral warning
>
>   include/odp/api/hints.h           | 5 +++++
>   platform/linux-generic/odp_weak.c | 4 ++--
>   test/validation/odp_init_log.c    | 1 +
>   3 files changed, 8 insertions(+), 2 deletions(-)
>
diff mbox

Patch

diff --git a/test/validation/odp_init_log.c b/test/validation/odp_init_log.c
index c072147..275d343 100644
--- a/test/validation/odp_init_log.c
+++ b/test/validation/odp_init_log.c
@@ -10,6 +10,7 @@ 
 
 int replacement_logging_used;
 
+ODP_PRINTF_FORMAT(2, 3)
 static int odp_init_log(odp_log_level_e level , const char *fmt, ...);
 
 static void test_odp_init_global_replace_log(void)