mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-05-08 07:58:03 +02:00
hw/xfree86: Fix -Wincompatible-pointer-types sbus compile failure
```
../hw/xfree86/common/xf86sbusBus.c: In function ‘xf86SbusConfigureNewDev’:
../hw/xfree86/common/xf86sbusBus.c:751:21: error: passing argument 1 of ‘XNFasprintf’ from incompatible pointer type [-Wincompatible-pointer-types]
751 | XNFasprintf(&GDev->busID, "SBUS:%s", promPath);
| ^~~~~~~~~~~~
| |
| const char **
```
Apply the same fix as in commit e1e01d2e3 ("xfree86/common: Warning
fixes. Mostly const string handling.")
(cherry picked from commit bdacb100bf)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1752>
This commit is contained in:
parent
1958e0f25b
commit
203e0667d2
1 changed files with 4 additions and 2 deletions
|
|
@ -740,6 +740,7 @@ void
|
|||
xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus, GDevRec * GDev)
|
||||
{
|
||||
char *promPath = NULL;
|
||||
char *tmp;
|
||||
|
||||
sBus = (sbusDevicePtr) busData;
|
||||
GDev->identifier = sBus->descr;
|
||||
|
|
@ -748,10 +749,11 @@ xf86SbusConfigureNewDev(void *busData, sbusDevicePtr sBus, GDevRec * GDev)
|
|||
sparcPromClose();
|
||||
}
|
||||
if (promPath) {
|
||||
XNFasprintf(&GDev->busID, "SBUS:%s", promPath);
|
||||
XNFasprintf(&tmp, "SBUS:%s", promPath);
|
||||
free(promPath);
|
||||
}
|
||||
else {
|
||||
XNFasprintf(&GDev->busID, "SBUS:fb%d", sBus->fbNum);
|
||||
XNFasprintf(&tmp, "SBUS:fb%d", sBus->fbNum);
|
||||
}
|
||||
GDev->busID = tmp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue