[vlc-devel] [PATCH] gui/qt: dialogs/plugins: remove extraneous parentheses to silence warning

Filip Roséen filip at atch.se
Wed Mar 15 10:07:42 CET 2017


The code of course works as it should, but llvm will spit out a
warning diagnostic due to extraneous parenthesis (thinking that it
probably should be "=" instead of "==").

--

modules/gui/qt/dialogs/plugins.cpp:1349:18: warning: equality comparison with extraneous parentheses [-Wparentheses-equality]
    if ( ( value == ADDON_INSTALLED ) )
           ~~~~~~^~~~~~~~~~~~~~~~~~
modules/gui/qt/dialogs/plugins.cpp:1349:18: note: remove extraneous parentheses around the comparison to silence this warning
    if ( ( value == ADDON_INSTALLED ) )
         ~~      ^                  ~~
modules/gui/qt/dialogs/plugins.cpp:1349:18: note: use '=' to turn this equality comparison into an assignment
    if ( ( value == ADDON_INSTALLED ) )
---
 modules/gui/qt/dialogs/plugins.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/gui/qt/dialogs/plugins.cpp b/modules/gui/qt/dialogs/plugins.cpp
index 9e05b08bfa..4e8d27363a 100644
--- a/modules/gui/qt/dialogs/plugins.cpp
+++ b/modules/gui/qt/dialogs/plugins.cpp
@@ -1346,7 +1346,7 @@ void AddonItemDelegate::editButtonClicked()
     QWidget *editor = qobject_cast<QWidget *>(sender()->parent());
     if ( !editor ) return;
     int value = editor->property("Addon::state").toInt();
-    if ( ( value == ADDON_INSTALLED ) )
+    if ( value == ADDON_INSTALLED )
         /* uninstall */
         editor->setProperty("Addon::state", ADDON_UNINSTALLING );
     else
-- 
2.12.0


More information about the vlc-devel mailing list