Bug 34977 - implicit declaration of function, incompatible pointer type
Summary: implicit declaration of function, incompatible pointer type
Status: NEW
Alias: None
Product: Sisyphus
Classification: Development
Component: xorg-drv-nouveau (show other bugs)
Version: unstable
Hardware: all Linux
: P3 major
Assignee: Valery Inozemtsev
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-01 18:49 MSK by Ivan Zakharyaschev
Modified: 2018-06-06 17:16 MSK (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Zakharyaschev 2018-06-01 18:49:42 MSK
xorg-drv-nouveau-2:1.0.15-alt1

Это может приводить к серьёзным ошибкам при работе; лучше бы поаккуратнее всё поинклюдить:

$ egrep -4 -e 'implicit declaration of function|incompatible pointer type' /beehive/logs/Sisyphus-x86_64/latest/success/xorg-drv-nouveau-2\:1.0.15-alt1
  CC       nouveau_wfb.lo
  CC       nv_accel_common.lo
  CC       nv_driver.lo
nv_driver.c: In function 'NVScreenInit':
nv_driver.c:1443:9: warning: implicit declaration of function 'wfbScreenInit'; did you mean 'fbScreenInit'? [-Wimplicit-function-declaration]
   ret = wfbScreenInit(pScreen, FBStart, pScrn->virtualX,
         ^~~~~~~~~~~~~
         fbScreenInit
  CC       nv_shadow.lo
--
/usr/include/xorg/xf86Crtc.h:1068:37: note: declared here
 static _X_INLINE _X_DEPRECATED void xf86_reload_cursors(ScreenPtr screen) {}
                                     ^~~~~~~~~~~~~~~~~~~
drmmode_display.c: In function 'drmmode_set_scanout_pixmap':
drmmode_display.c:697:28: warning: passing argument 1 of 'PixmapStopDirtyTracking' from incompatible pointer type [-Wincompatible-pointer-types]
    PixmapStopDirtyTracking(crtc->randr_crtc->scanout_pixmap, screenpix);
                            ^~~~
In file included from /usr/include/xorg/gc.h:54:0,
                 from /usr/include/xorg/dix.h:51,
--
                 from drmmode_display.c:36:
/usr/include/xorg/pixmap.h:130:1: note: expected 'DrawablePtr {aka struct _Drawable *}' but argument is of type 'PixmapPtr {aka struct _Pixmap *}'
 PixmapStopDirtyTracking(DrawablePtr src, PixmapPtr slave_dst);
 ^~~~~~~~~~~~~~~~~~~~~~~
drmmode_display.c:744:27: warning: passing argument 1 of 'PixmapStartDirtyTracking' from incompatible pointer type [-Wincompatible-pointer-types]
  PixmapStartDirtyTracking(ppix, screenpix, 0, 0, this_x, 0, RR_Rotate_0);
                           ^~~~
In file included from /usr/include/xorg/gc.h:54:0,
                 from /usr/include/xorg/dix.h:51,

Я бы вообще запретил с таким warnings собирать, а то потом ошибки трудноуловимые.
Comment 1 Ivan Zakharyaschev 2018-06-01 20:22:38 MSK
The first error can be corrected by an

#include "fb.h"

As for the incompatible pointer type errors, these are not really errors, because PointerPtr points to a structure whose beginning is the same structure as DrawablePtr points to. So, it works correctly, but we might want to silence te warning by a type conversion before the pointer at these two places.