mate-desktop / mate-settings-daemon

MATE settings daemon
https://mate-desktop.org
GNU General Public License v2.0
43 stars 48 forks source link

cppcheck warning: null pointer redundant check #351

Closed rbuj closed 3 years ago

rbuj commented 3 years ago
plugins/a11y-keyboard/msd-a11y-keyboard-manager.c:206:31: warning: Either the condition 'desc!=NULL' is redundant or there is possible null pointer dereference: desc. [nullPointerRedundantCheck]
        g_return_val_if_fail (desc->ctrls != NULL, NULL);
                              ^
plugins/a11y-keyboard/msd-a11y-keyboard-manager.c:199:18: note: Assuming that condition 'desc!=NULL' is not redundant
        if (desc != NULL) {
                 ^
plugins/a11y-keyboard/msd-a11y-keyboard-manager.c:206:31: note: Null pointer dereference
        g_return_val_if_fail (desc->ctrls != NULL, NULL);
                              ^