diff options
author | 2014-12-03 16:26:37 +0200 | |
---|---|---|
committer | 2014-12-03 16:51:22 +0100 | |
commit | 580039e838a7efaee0048b0857d1bb5582327aa5 (patch) | |
tree | 5378a8290cbe54b9d22b71bcba9c89fc166f0645 /tools/perf/scripts/python | |
parent | Bluetooth: Fix minor coding style issue in smp.c (diff) | |
download | wireguard-linux-580039e838a7efaee0048b0857d1bb5582327aa5.tar.xz wireguard-linux-580039e838a7efaee0048b0857d1bb5582327aa5.zip |
Bluetooth: Fix false-positive "uninitialized" compiler warning
Some gcc versions don't seem to be able to properly track the flow of
the smp_cmd_pairing_random() function and end up causing the following
types of (false-positive) warnings:
smp.c:1995:6: warning: ‘nb’ may be used uninitialized in this function [-Wmaybe-uninitialized]
err = smp_g2(smp->tfm_cmac, pkax, pkbx, na, nb, &passkey);
smp.c:1995:6: warning: ‘na’ may be used uninitialized in this function [-Wmaybe-uninitialized]
err = smp_g2(smp->tfm_cmac, pkax, pkbx, na, nb, &passkey);
^
smp.c:1995:6: warning: ‘pkbx’ may be used uninitialized in this function [-Wmaybe-uninitialized]
err = smp_g2(smp->tfm_cmac, pkax, pkbx, na, nb, &passkey);
^
smp.c:1995:6: warning: ‘pkax’ may be used uninitialized in this function [-Wmaybe-uninitialized]
err = smp_g2(smp->tfm_cmac, pkax, pkbx, na, nb, &passkey);
This patch fixes the issue by moving the pkax/pkbx and na/nb
initialization earlier in the function.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions