1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-30 04:05:51 +01:00

WINGs: fix duplicate if/else branch in W_LookupString

cppcheck is reporting the msg below:

[../WINGs/winputmethod.c:215] -> [../WINGs/winputmethod.c:209]:
(style) Found duplicate branches for 'if' and 'else'.

The patch is fixing it by setting a default return call.
This commit is contained in:
David Maciejak
2014-05-28 12:21:22 +07:00
committed by Carlos R. Mafra
parent 5088b6755d
commit db9f5c9658

View File

@@ -199,20 +199,15 @@ void W_SetPreeditPositon(W_View * view, int x, int y)
} }
} }
int int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer, int buflen, KeySym *keysym, Status *status)
W_LookupString(W_View * view, XKeyPressedEvent * event, char *buffer, int buflen, KeySym * keysym, Status * status)
{ {
WMScreen *scr = W_VIEW_SCREEN(view); WMScreen *scr = W_VIEW_SCREEN(view);
XSetInputFocus(scr->display, view->window, RevertToParent, CurrentTime); XSetInputFocus(scr->display, view->window, RevertToParent, CurrentTime);
if (view->xic) {
#ifdef X_HAVE_UTF8_STRING #ifdef X_HAVE_UTF8_STRING
if (view->xic)
return Xutf8LookupString(view->xic, event, buffer, buflen, keysym, status); return Xutf8LookupString(view->xic, event, buffer, buflen, keysym, status);
#else
return XLookupString(event, buffer, buflen, keysym, (XComposeStatus *) status);
#endif #endif
} else { return XLookupString(event, buffer, buflen, keysym, (XComposeStatus *) status);
return XLookupString(event, buffer, buflen, keysym, (XComposeStatus *) status);
}
} }