connman.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] build: Cleanup of iwd provision_service_wifi()
@ 2021-10-18  8:16 Emmanuel VAUTRIN
  2021-10-18  8:16 ` [PATCH 2/3] build: Fix uninitialized errors in iptables tests Emmanuel VAUTRIN
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Emmanuel VAUTRIN @ 2021-10-18  8:16 UTC (permalink / raw)
  To: connman; +Cc: Emmanuel VAUTRIN

gcc reports with:

 src/config.c: In function 'try_provision_service':
 src/config.c:1421:3: error: 'ssid' may be used uninitialized in this
function [-Werror=maybe-uninitialized]
  1421 |   provision_service_wifi(config, service, network,
       |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1422 |        ssid, ssid_len);
       |        ~~~~~~~~~~~~~~~

Removing the useless ssid and ssid_len parameters solves the problem.
---
 src/config.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/src/config.c b/src/config.c
index 62023b1072da..33fdc7375c15 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1106,8 +1106,7 @@ static char *config_pem_fsid(const char *pem_file)
 
 static void provision_service_wifi(struct connman_config_service *config,
 				struct connman_service *service,
-				struct connman_network *network,
-				const void *ssid, unsigned int ssid_len)
+				struct connman_network *network)
 {
 	if (config->eap)
 		__connman_service_set_string(service, "EAP", config->eap);
@@ -1418,8 +1417,7 @@ static int try_provision_service(struct connman_config_service *config,
 						config->timeservers);
 
 	if (type == CONNMAN_SERVICE_TYPE_WIFI) {
-		provision_service_wifi(config, service, network,
-							ssid, ssid_len);
+		provision_service_wifi(config, service, network);
 	}
 
 	__connman_service_mark_dirty();
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-10-20 14:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-18  8:16 [PATCH 1/3] build: Cleanup of iwd provision_service_wifi() Emmanuel VAUTRIN
2021-10-18  8:16 ` [PATCH 2/3] build: Fix uninitialized errors in iptables tests Emmanuel VAUTRIN
2021-10-18  8:16 ` [PATCH 3/3] build: Fix uninitialized false positive in dnsproxy Emmanuel VAUTRIN
2021-10-20  6:08 ` [PATCH 1/3] build: Cleanup of iwd provision_service_wifi() Daniel Wagner
2021-10-20  6:13   ` Daniel Wagner
2021-10-20 14:31     ` VAUTRIN Emmanuel (Canal Plus Prestataire)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).