From 885da419dcdc829366b3b1301dd827f2f6c8b9af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Fri, 13 Sep 2024 11:57:18 +0200 Subject: [PATCH] Silence a compiler warning. Passing `t_aa_cases[i].desc` as a format string is perfectly safe, since it's a static string that we wrote ourselves, but the compiler can't see that, so it emits a warning. --- t/t_aa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t/t_aa.c b/t/t_aa.c index b15177a..96b63a0 100644 --- a/t/t_aa.c +++ b/t/t_aa.c @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2016-2018 Dag-Erling Smørgrav + * Copyright (c) 2016-2024 Dag-Erling Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -221,7 +221,7 @@ t_prepare(int argc CRYB_UNUSED, char *argv[] CRYB_UNUSED) unsigned int i; for (i = 0; i < sizeof t_aa_cases / sizeof t_aa_cases[0]; ++i) - t_add_test(t_aa_test, &t_aa_cases[i], t_aa_cases[i].desc); + t_add_test(t_aa_test, &t_aa_cases[i], "%s", t_aa_cases[i].desc); t_add_test(t_aa_find, NULL, "aa_find()"); t_add_test(t_aa_next, NULL, "aa_next()"); t_add_test(t_aa_destroy, NULL, "aa_destroy()");