Commit 0888421d authored by Daniel Schultz's avatar Daniel Schultz Committed by github-actions[bot]
Browse files

drivers: led: Fix warnings in shell_print


Change format in various shell_error calls from int to long unsigned
int.

Warning:

    warning: format '%d' expects argument of type 'int', but argument
    6 has type 'long unsigned int'
Signed-off-by: default avatarDaniel Schultz <d.schultz@phytec.de>
parent 7bdf1775
Showing with 6 additions and 6 deletions
+6 -6
......@@ -142,12 +142,12 @@ static int cmd_set_brightness(const struct shell *shell,
return -EINVAL;
}
if (value > 100) {
shell_error(shell, "Invalid LED brightness value %d (max 100)",
shell_error(shell, "Invalid LED brightness value %lu (max 100)",
value);
return -EINVAL;
}
shell_print(shell, "%s: setting LED %d brightness to %d",
shell_print(shell, "%s: setting LED %d brightness to %lu",
dev->name, led, value);
err = led_set_brightness(dev, led, (uint8_t) value);
......@@ -192,7 +192,7 @@ static int cmd_set_color(const struct shell *shell, size_t argc, char **argv)
}
if (col > 255) {
shell_error(shell,
"Invalid LED color value %d (max 255)",
"Invalid LED color value %lu (max 255)",
col);
return -EINVAL;
}
......@@ -234,12 +234,12 @@ static int cmd_set_channel(const struct shell *shell, size_t argc, char **argv)
return -EINVAL;
}
if (value > 255) {
shell_error(shell, "Invalid channel value %d (max 255)",
shell_error(shell, "Invalid channel value %lu (max 255)",
value);
return -EINVAL;
}
shell_print(shell, "%s: setting channel %d to %d",
shell_print(shell, "%s: setting channel %d to %lu",
dev->name, channel, value);
err = led_set_channel(dev, channel, (uint8_t) value);
......@@ -286,7 +286,7 @@ cmd_write_channels(const struct shell *shell, size_t argc, char **argv)
}
if (val > 255) {
shell_error(shell,
"Invalid channel value %d (max 255)", val);
"Invalid channel value %lu (max 255)", val);
return -EINVAL;
}
value[i] = val;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment