summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2015-02-16 00:14:18 +0100
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2015-02-16 08:27:24 +0000
commit0ce7fd4be6892fe55c8a5635a78bdf6378363e6a (patch)
tree7edd22003c3ab6c0098a8483fdf79e67979bfd98
parenta4b3be5e59d27c4e8e053d7c093e50dd9bab96da (diff)
downloadwireshark-0ce7fd4be6892fe55c8a5635a78bdf6378363e6a.tar.gz
Trivial Dead assignment fixes in configure
Fixes a Dead assignment and unused variable warning. With this patch and http://www.cmake.org/Bug/view.php?id=15203, `scan-build cmake` will give zero warnings! Change-Id: Idc7a03fbf1e8196bc139a2c6663ec48b897f2897 Reviewed-on: https://code.wireshark.org/review/7144 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
-rw-r--r--ConfigureChecks.cmake9
-rw-r--r--configure.ac9
2 files changed, 10 insertions, 8 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index a3be685778..62314dc62a 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -119,10 +119,11 @@ if (NL_FOUND)
"#include <linux/nl80211.h>
int main() {
int x = NL80211_FREQUENCY_ATTR_MAX_TX_POWER;
- x = NL80211_ATTR_SUPPORTED_IFTYPES;
- x = NL80211_ATTR_SUPPORTED_COMMANDS;
- x = NL80211_ATTR_WIPHY_FREQ;
- x = NL80211_CHAN_NO_HT;
+ x |= NL80211_ATTR_SUPPORTED_IFTYPES;
+ x |= NL80211_ATTR_SUPPORTED_COMMANDS;
+ x |= NL80211_ATTR_WIPHY_FREQ;
+ x |= NL80211_CHAN_NO_HT;
+ (void)x;
}"
HAVE_NL80211
)
diff --git a/configure.ac b/configure.ac
index 1896d08008..5f095beac0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -718,10 +718,11 @@ linux*)
AC_MSG_CHECKING([if nl80211.h is new enough])
AC_TRY_COMPILE([#include <linux/nl80211.h>],
[int x = NL80211_FREQUENCY_ATTR_MAX_TX_POWER;
- x = NL80211_ATTR_SUPPORTED_IFTYPES;
- x = NL80211_ATTR_SUPPORTED_COMMANDS;
- x = NL80211_ATTR_WIPHY_FREQ;
- x = NL80211_CHAN_NO_HT;],
+ x |= NL80211_ATTR_SUPPORTED_IFTYPES;
+ x |= NL80211_ATTR_SUPPORTED_COMMANDS;
+ x |= NL80211_ATTR_WIPHY_FREQ;
+ x |= NL80211_CHAN_NO_HT;
+ (void)x;],
[AC_MSG_RESULT(yes) AC_DEFINE(HAVE_NL80211, 1, [nl80211.h is new enough])],
[AC_MSG_RESULT(no)])