2022-02-04 13:27:51 +00:00
|
|
|
From 3b05406c02070df3e7f19399d81ebd35ed6deae5 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Claudiu Beznea <claudiu.beznea@microchip.com>
|
|
|
|
Date: Tue, 12 Oct 2021 17:43:28 +0300
|
|
|
|
Subject: [PATCH] fix -Wformat-security
|
|
|
|
|
|
|
|
Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
|
|
|
|
---
|
|
|
|
cmd/panic.c | 2 +-
|
|
|
|
cmd/version.c | 2 +-
|
|
|
|
drivers/pinctrl/pinctrl-uclass.c | 2 +-
|
|
|
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
|
|
|
|
--- a/cmd/panic.c
|
|
|
|
+++ b/cmd/panic.c
|
2022-06-29 11:17:17 +00:00
|
|
|
@@ -11,7 +11,7 @@ static int do_panic(struct cmd_tbl *cmdt
|
2022-02-04 13:27:51 +00:00
|
|
|
{
|
|
|
|
char *text = (argc < 2) ? "" : argv[1];
|
|
|
|
|
|
|
|
- panic(text);
|
|
|
|
+ panic("%s\n", text);
|
|
|
|
|
|
|
|
return CMD_RET_SUCCESS;
|
|
|
|
}
|
2019-08-14 00:42:14 +00:00
|
|
|
--- a/cmd/version.c
|
|
|
|
+++ b/cmd/version.c
|
2022-06-29 11:17:17 +00:00
|
|
|
@@ -24,7 +24,7 @@ static int do_version(struct cmd_tbl *cm
|
2019-08-14 00:42:14 +00:00
|
|
|
{
|
2020-08-22 19:55:49 +00:00
|
|
|
char buf[DISPLAY_OPTIONS_BANNER_LENGTH];
|
|
|
|
|
2019-08-14 00:42:14 +00:00
|
|
|
- printf(display_options_get_banner(false, buf, sizeof(buf)));
|
2022-02-04 13:27:51 +00:00
|
|
|
+ printf("%s", display_options_get_banner(false, buf, sizeof(buf)));
|
2019-08-14 00:42:14 +00:00
|
|
|
#ifdef CC_VERSION_STRING
|
2020-08-22 19:55:49 +00:00
|
|
|
puts(CC_VERSION_STRING "\n");
|
2019-08-14 00:42:14 +00:00
|
|
|
#endif
|
2020-08-22 19:55:49 +00:00
|
|
|
--- a/drivers/pinctrl/pinctrl-uclass.c
|
|
|
|
+++ b/drivers/pinctrl/pinctrl-uclass.c
|
2022-06-29 11:17:17 +00:00
|
|
|
@@ -375,7 +375,7 @@ int pinctrl_get_pin_name(struct udevice
|
2020-08-22 19:55:49 +00:00
|
|
|
if (!ops->get_pin_name)
|
|
|
|
return -ENOSYS;
|
|
|
|
|
|
|
|
- snprintf(buf, size, ops->get_pin_name(dev, selector));
|
|
|
|
+ snprintf(buf, size, "%s", ops->get_pin_name(dev, selector));
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|