[Olsr-dev] [PATCH] Fix printf based warning in PUD

Ferry Huberts (spam-protected)
Thu May 24 16:04:54 CEST 2012



On 24-05-12 15:59, Henning Rogge wrote:
>  From 21a4b73a4a2c67e458f6865e91b6f20c8de963a4 Mon Sep 17 00:00:00 2001
> From: Henning Rogge <(spam-protected)>
> Date: Thu, 24 May 2012 15:56:48 +0200
> Subject: [PATCH] Fix printf based warning in PUD
>
>
> Signed-off-by: Henning Rogge <(spam-protected)>
> ---
> lib/pud/src/configuration.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/lib/pud/src/configuration.c b/lib/pud/src/configuration.c
> index 286768c..2be36be 100644
> --- a/lib/pud/src/configuration.c
> +++ b/lib/pud/src/configuration.c
> @@ -344,7 +344,7 @@ static bool intSetupNodeIdBinaryString(void) {
> invalidChars = nmea_string_has_invalid_chars(nodeid,
> PUD_NODE_ID_NAME, &report[0], sizeof(report));
> if (invalidChars) {
> - pudError(false, &report[0]);
> + pudError(false, "%s", &report[0]);
> return false;
> }
>
> @@ -1345,7 +1345,7 @@ int setTxNmeaMessagePrefix(const char *value, void
> *data __attribute__ ((unused)
> invalidChars = nmea_string_has_invalid_chars(value, valueName, &report[0],
> sizeof(report));
> if (invalidChars) {
> - pudError(false, &report[0]);
> + pudError(false, "%s", &report[0]);
> return true;
> }
>

Reviewed-by: Ferry Huberts <(spam-protected)>


strange that my compiler didn't catch this...
-- 
Ferry Huberts




More information about the Olsr-dev mailing list