From 62743f4c71f79d9db3f1f27594ec7d7372c00d80 Mon Sep 17 00:00:00 2001 From: Dustin Brown Date: Wed, 24 Oct 2018 14:53:18 -0700 Subject: [PATCH] qcacld-3.0: Initialize out_mode in hdd_parse_driver_mode gcc-4.8 incorrectly flags the use of @next_mode in __con_mode_handler as potentially uninitialized, while newer versions do not seem to have a problem. Work around the compiler quirk by initializing @out_mode in hdd_parse_driver_mode. Change-Id: Iee101db6eaded8e856e461458d6a80e8279e9ca1 CRs-Fixed: 2338538 --- core/hdd/src/wlan_hdd_main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index e917c0f54180..fa00199c65db 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -13242,6 +13242,8 @@ hdd_parse_driver_mode(const char *mode_str, enum QDF_GLOBAL_MODE *out_mode) int mode; int errno; + *out_mode = QDF_GLOBAL_MAX_MODE; + errno = kstrtoint(mode_str, 0, &mode); if (!errno) *out_mode = (enum QDF_GLOBAL_MODE)mode;