PUD: fix printf based warning
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 24 May 2012 16:37:00 +0000 (18:37 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 24 May 2012 16:37:11 +0000 (18:37 +0200)
As pointed out by Henning (and later Saverio).
My compiler didn't catch this (strange).

Signed-off-by: Henning Rogge <henning.rogge@fkie.fraunhofer.de>
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/pud/src/configuration.c

index 286768c..2be36be 100644 (file)
@@ -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;
        }