mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
xwin: silence const char* assignment warnings
the target struct type defines char* fields, but we're sure they'll never be written into, so just add typecast for silencing the warning. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
committed by
Enrico Weigelt
parent
01502a4ddd
commit
a2304300aa
@@ -340,14 +340,15 @@ winConfigKeyboard(DeviceIntPtr pDevice)
|
||||
pLayout->xkbvariant ? pLayout->xkbvariant : "none",
|
||||
pLayout->xkboptions ? pLayout->xkboptions : "none");
|
||||
|
||||
g_winInfo.xkb.model = pLayout->xkbmodel;
|
||||
g_winInfo.xkb.layout = pLayout->xkblayout;
|
||||
g_winInfo.xkb.variant = pLayout->xkbvariant;
|
||||
g_winInfo.xkb.options = pLayout->xkboptions;
|
||||
/* need the typecast to (char*) in order to silence const warning */
|
||||
g_winInfo.xkb.model = (char*)pLayout->xkbmodel;
|
||||
g_winInfo.xkb.layout = (char*)pLayout->xkblayout;
|
||||
g_winInfo.xkb.variant = (char*)pLayout->xkbvariant;
|
||||
g_winInfo.xkb.options = (char*)pLayout->xkboptions;
|
||||
|
||||
if (deviceIdentifier == 0xa000) {
|
||||
winMsg(X_PROBED, "Windows keyboard layout device identifier indicates Macintosh, setting Model = \"macintosh\"");
|
||||
g_winInfo.xkb.model = "macintosh";
|
||||
g_winInfo.xkb.model = (char*)"macintosh";
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user