summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-12-03 16:26:37 +0200
committerMarcel Holtmann <marcel@holtmann.org>2014-12-03 16:51:22 +0100
commit580039e838a7efaee0048b0857d1bb5582327aa5 (patch)
tree5378a8290cbe54b9d22b71bcba9c89fc166f0645 /drivers/bluetooth
parent7f376cd6dc1c9bfd14514c70765e6900a961c4b8 (diff)
downloadblackbird-op-linux-580039e838a7efaee0048b0857d1bb5582327aa5.tar.gz
blackbird-op-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 'drivers/bluetooth')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud