summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@google.com>2023-02-24 17:26:41 +0000
committerChromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-02-24 17:59:31 +0000
commited9c50d5e63079aa12499e1f9495b4457995bdce (patch)
treeb87358a074f7d0406f1656407c26bbf54b994390
parent3495069b4e13950728cd52291664a7e27f86bbda (diff)
downloadchrome-ec-ed9c50d5e63079aa12499e1f9495b4457995bdce.tar.gz
gsctool: initialize char* pointer correctly
If gsctool is compiled more strictly, these uninitialized variables cause errors. Set the pointers to empty string like other char* variables. BUG=none TEST=make all for gsctool compiles without errors in a more strict setting Change-Id: Id65d51bcc5b81451f4235650c2cf8042986d5197 Signed-off-by: Jett Rink <jettrink@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4290237 Reviewed-by: Mary Ruthven <mruthven@chromium.org> Auto-Submit: Jett Rink <jettrink@chromium.org> Tested-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
-rw-r--r--extra/usb_updater/gsctool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extra/usb_updater/gsctool.c b/extra/usb_updater/gsctool.c
index 8af5f0c550..c4402de461 100644
--- a/extra/usb_updater/gsctool.c
+++ b/extra/usb_updater/gsctool.c
@@ -3892,7 +3892,7 @@ int main(int argc, char *argv[])
int rma = 0;
const char *rma_auth_code = "";
int get_endorsement_seed = 0;
- const char *endorsement_seed_str;
+ const char *endorsement_seed_str = "";
int corrupt_inactive_rw = 0;
struct board_id bid;
enum board_id_action bid_action;
@@ -3923,7 +3923,7 @@ int main(int argc, char *argv[])
"Options -a, -s and -t are mutually exclusive\n";
const char *openbox_desc_file = NULL;
int factory_mode = 0;
- char *factory_mode_arg;
+ char *factory_mode_arg = "";
char *tpm_mode_arg = NULL;
char *serial = NULL;
int sn_bits = 0;