summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhaoyang Liu <zhaoyang@codeaurora.org>2017-04-06 17:31:43 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-04-06 19:47:35 -0700
commit025722cb50ee5a083ce8342f857d005d6d21d428 (patch)
treea99c71630941c1c3e76e891ee0a4d145c9863065
parentb56990a23edb953ef4333c26ae1fed4c5b0cdbe1 (diff)
qcacld-2.0: fix compilation error about Werror-format
While printing the difference of rssi using absolute value, the macro abs will change the results to long long int. It may give compilation error if the compiler flag "[-Werror=format]" is enabled on kernel version 4.4.21. It need use a proper type cast conversion to avoid this issue. Change-Id: I2eebf6ddbf154397a5285266fef8792c36a6a651 CRs-Fixed: 2030011
-rw-r--r--CORE/SME/src/csr/csrNeighborRoam.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/CORE/SME/src/csr/csrNeighborRoam.c b/CORE/SME/src/csr/csrNeighborRoam.c
index d21f67c213d9..664bcd89a9bd 100644
--- a/CORE/SME/src/csr/csrNeighborRoam.c
+++ b/CORE/SME/src/csr/csrNeighborRoam.c
@@ -2314,8 +2314,8 @@ csrNeighborRoamProcessScanResults(tpAniSirGlobal pMac,
"%s: [INFOLOG] potential candidate to roam "
"immediately (diff=%ld, expected=%d)",
__func__,
- abs(abs(CurrAPRssi) -
- abs(pScanResult->BssDescriptor.rssi)),
+ (long int)abs(abs(CurrAPRssi) -
+ abs(pScanResult->BssDescriptor.rssi)),
immediateRoamRssiDiff);
roamNow = eANI_BOOLEAN_TRUE;
#endif