From: Emmanuel VAUTRIN <emmanuel.vautrin@gmail.com>
To: connman@lists.linux.dev
Cc: Emmanuel VAUTRIN <Emmanuel.VAUTRIN@cpexterne.org>
Subject: [PATCH 1/3] build: Cleanup of iwd provision_service_wifi()
Date: Mon, 18 Oct 2021 10:16:00 +0200 [thread overview]
Message-ID: <20211018081602.82984-1-Emmanuel.VAUTRIN@cpexterne.org> (raw)
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
next reply other threads:[~2021-10-18 8:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-18 8:16 Emmanuel VAUTRIN [this message]
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)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211018081602.82984-1-Emmanuel.VAUTRIN@cpexterne.org \
--to=emmanuel.vautrin@gmail.com \
--cc=Emmanuel.VAUTRIN@cpexterne.org \
--cc=connman@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).