diff options
author | Jett Rink <jettrink@google.com> | 2023-02-24 17:26:41 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-05-03 19:40:14 +0000 |
commit | ec76d7bea665c42b8c35067b3cde0fdb997cbc0d (patch) | |
tree | fdab8426f30e7d4d773f51d02bbeb688fb4489cc | |
parent | 306ec1ed25d3ba7c25e39b70a67d7c141a5c0e15 (diff) | |
download | chrome-ec-ec76d7bea665c42b8c35067b3cde0fdb997cbc0d.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>
(cherry picked from commit ed9c50d5e63079aa12499e1f9495b4457995bdce)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4481585
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Auto-Submit: Mary Ruthven <mruthven@chromium.org>
(cherry picked from commit f00768dfa8c4ffbd234877547d756a553023e0f2)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4501309
Reviewed-by: Andrey Pronin <apronin@chromium.org>
-rw-r--r-- | extra/usb_updater/gsctool.c | 4 |
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; |