Debian Bug report logs - #1078229
xserver-xorg-video-ivtvdev: FTBFS with GCC 14: error: assignment ... from incompatible pointer type ...

version graph

Package: src:xserver-xorg-video-ivtvdev; Maintainer for src:xserver-xorg-video-ivtvdev is Debian X Strike Force <[email protected]>;

Reported by: Andreas Beckmann <[email protected]>

Date: Thu, 8 Aug 2024 19:48:02 UTC

Severity: serious

Tags: forky, ftbfs, patch, sid, trixie

Found in version xserver-xorg-video-ivtvdev/1.1.2-2

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Debian X Strike Force <[email protected]>:
Bug#1078229; Package src:xserver-xorg-video-ivtvdev. (Thu, 08 Aug 2024 19:48:04 GMT) (full text, mbox, link).


Acknowledgement sent to Andreas Beckmann <[email protected]>:
New Bug report received and forwarded. Copy sent to Debian X Strike Force <[email protected]>. (Thu, 08 Aug 2024 19:48:04 GMT) (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Andreas Beckmann <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: xserver-xorg-video-ivtvdev: FTBFS with GCC 14: error: assignment ... from incompatible pointer type ...
Date: Thu, 08 Aug 2024 21:45:07 +0200
[Message part 1 (text/plain, inline)]
Source: xserver-xorg-video-ivtvdev
Version: 1.1.2-2
Severity: serious
Tags: ftbfs sid trixie
Justification: fails to build from source (but built successfully in the past)

Hi,

xserver-xorg-video-ivtvdev started to FTBFS when GCC 14 was made the
default compiler:

Making all in src
make[3]: Entering directory '/build/xserver-xorg-video-ivtvdev-1.1.2/build/src'
/bin/bash ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../src -I..    -I/usr/include/xorg -fvisibility=hidden -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm   -g -O2 -c -o ivtv.lo ../../src/ivtv.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -I/usr/include/xorg -fvisibility=hidden -I/usr/include/pixman-1 -I/usr/include/X11/dri -I/usr/include/libdrm -g -O2 -c ../../src/ivtv.c  -fPIC -DPIC -o .libs/ivtv.o
../../src/ivtv.c: In function 'IVTVDevProbe':
../../src/ivtv.c:350:13: warning: assignment discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  350 |         dev = xf86FindOptionValue(devSections[i]->options, "fbdev");
      |             ^
../../src/ivtv.c:373:26: error: assignment to 'ModeStatus (*)(struct _ScrnInfoRec *, struct _DisplayModeRec *, Bool,  int)' {aka 'ModeStatus (*)(struct _ScrnInfoRec *, struct _DisplayModeRec *, int,  int)'} from incompatible pointer type 'int (*)(int,  struct _DisplayModeRec *, Bool,  int)' {aka 'int (*)(int,  struct _DisplayModeRec *, int,  int)'} [-Wincompatible-pointer-types]
  373 |         pScrn->ValidMode = ivtvHWValidMode;
      |                          ^
../../src/ivtv.c: In function 'IVTVDevPreInit':
../../src/ivtv.c:423:13: warning: passing argument 3 of 'ivtvHWInit' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
  423 |             xf86FindOptionValue(devPtr->pEnt->device->options, "fbdev")))
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../src/ivtv.c:36:
../../src/ivtv_hw.h:65:70: note: expected 'char *' but argument is of type 'const char *'
   65 | Bool ivtvHWInit(ScrnInfoPtr pScrn, struct pci_device *PciInfo, char *device);
      |                                                                ~~~~~~^~~~~~
make[3]: *** [Makefile:338: ivtv.lo] Error 1
make[3]: Leaving directory '/build/xserver-xorg-video-ivtvdev-1.1.2/build/src'


Andreas
[xserver-xorg-video-ivtvdev_1.1.2-2.log.gz (application/gzip, attachment)]

Information forwarded to [email protected], Debian X Strike Force <[email protected]>:
Bug#1078229; Package src:xserver-xorg-video-ivtvdev. (Sat, 01 Mar 2025 08:48:03 GMT) (full text, mbox, link).


Acknowledgement sent to Petter Reinholdtsen <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <[email protected]>. (Sat, 01 Mar 2025 08:48:03 GMT) (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Petter Reinholdtsen <[email protected]>
To: Andreas Beckmann <[email protected]>, [email protected]
Subject: Re: xserver-xorg-video-ivtvdev: FTBFS with GCC 14: error: assignment ... from incompatible pointer type ...
Date: Sat, 1 Mar 2025 09:44:54 +0100
Control: tags -1 + patch

The following patch should get the package building again:

Description: Fix build problems with newer Xorg and compiler.
 Ensure correct method and variable declaration to avoid fatal
 compiler warnings.
Author: Petter Reinholdtsen <[email protected]>
Forwarded: no
Last-Update: 2025-03-01
---
Index: xserver-xorg-video-ivtvdev-salsa/src/ivtv.c
===================================================================
--- xserver-xorg-video-ivtvdev-salsa.orig/src/ivtv.c	2025-03-01 08:38:08.000000000 +0000
+++ xserver-xorg-video-ivtvdev-salsa/src/ivtv.c	2025-03-01 08:39:21.550211876 +0000
@@ -314,7 +314,7 @@
     int i;
     GDevPtr *devSections;
     int numDevSections;
-    char *dev;
+    const char *dev;
     Bool foundScreen = FALSE;
     int *usedChips;
     int numUsed;
Index: xserver-xorg-video-ivtvdev-salsa/src/ivtv_hw.c
===================================================================
--- xserver-xorg-video-ivtvdev-salsa.orig/src/ivtv_hw.c	2025-03-01 08:38:08.000000000 +0000
+++ xserver-xorg-video-ivtvdev-salsa/src/ivtv_hw.c	2025-03-01 08:39:14.554137292 +0000
@@ -168,12 +168,12 @@
 /* open correct framebuffer device                                      */
 
 static int
-ivtv_open(int scrnIndex, char *dev, char **namep, IVTVDevPtr devPtr)
+ivtv_open(int scrnIndex, const char *dev, char **namep, IVTVDevPtr devPtr)
 {
     struct fb_fix_screeninfo fix;
     int fbufId = 255;
     int yuvId;
-    char *devid;
+    const char *devid;
     int fd;
 
     /* try argument (from XF86Config) first */
@@ -211,7 +211,7 @@
     if (fd == -1 || devPtr == NULL)
 	return fd;
 
-    devid = dev + 7;
+    devid = &dev[7];
 
     if (*devid == '/')
 	devid++;
@@ -340,9 +340,9 @@
 
 Bool
 #if XSERVER_LIBPCIACCESS
-ivtvHWProbe(struct pci_device *PciInfo, char *device, char **namep)
+ivtvHWProbe(struct pci_device *PciInfo, const char *device, char **namep)
 #else
-ivtvHWProbe(pciVideoPtr pPci, char *device, char **namep)
+ivtvHWProbe(pciVideoPtr pPci, const char *device, char **namep)
 #endif
 {
     int fd;
@@ -372,9 +372,9 @@
 
 Bool
 #if XSERVER_LIBPCIACCESS
-ivtvHWInit(ScrnInfoPtr pScrn, struct pci_device *PciInfo, char *device)
+ivtvHWInit(ScrnInfoPtr pScrn, struct pci_device *PciInfo, const char *device)
 #else
-ivtvHWInit(ScrnInfoPtr pScrn, pciVideoPtr pPci, char *device)
+ivtvHWInit(ScrnInfoPtr pScrn, pciVideoPtr pPci, const char *device)
 #endif
 {
     TRACE_ENTER("Init");
@@ -464,7 +464,7 @@
     int virtX = pScrn->display->virtualX;
     int virtY = pScrn->display->virtualY;
     struct fb_var_screeninfo var;
-    char **modename;
+    const char **modename;
     DisplayModePtr mode, this, last = NULL;
 
     TRACE_ENTER("VerifyModes");
@@ -688,10 +688,9 @@
 /* -------------------------------------------------------------------- */
 /* these can be hooked directly into ScrnInfoRec                        */
 
-int
-ivtvHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags)
+ModeStatus
+ivtvHWValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags)
 {
-    ScrnInfoPtr pScrn = xf86Screens[scrnIndex];
     IVTVDevPtr devPtr = IVTVDEVPTR(pScrn);
     struct fb_var_screeninfo var;
 
@@ -701,7 +700,7 @@
     xfree2ivtv_fblayout(pScrn, &devPtr->var);
     var.activate = FB_ACTIVATE_TEST;
     if (0 != ioctl(devPtr->fd, FBIOPUT_VSCREENINFO, (void *)(&devPtr->var))) {
-	xf86DrvMsg(scrnIndex, X_ERROR,
+	xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
 	    "ValidMode: FBIOPUT_VSCREENINFO failed (%s)\n", strerror(errno));
 	return MODE_BAD;
     }
Index: xserver-xorg-video-ivtvdev-salsa/src/ivtv_hw.h
===================================================================
--- xserver-xorg-video-ivtvdev-salsa.orig/src/ivtv_hw.h	2025-03-01 08:38:08.000000000 +0000
+++ xserver-xorg-video-ivtvdev-salsa/src/ivtv_hw.h	2025-03-01 08:39:53.102548048 +0000
@@ -61,11 +61,11 @@
 #endif
 
 #if XSERVER_LIBPCIACCESS
-Bool ivtvHWProbe(struct pci_device *PciInfo, char *device, char **namep);
-Bool ivtvHWInit(ScrnInfoPtr pScrn, struct pci_device *PciInfo, char *device);
+Bool ivtvHWProbe(struct pci_device *PciInfo, const char *device, char **namep);
+Bool ivtvHWInit(ScrnInfoPtr pScrn, struct pci_device *PciInfo, const char *device);
 #else
 Bool ivtvHWProbe(pciVideoPtr pPci, char *device, char **namep);
-Bool ivtvHWInit(ScrnInfoPtr pScrn, pciVideoPtr pPci, char *device);
+Bool ivtvHWInit(ScrnInfoPtr pScrn, pciVideoPtr pPci, const char *device);
 #endif
 char *ivtvHWGetName(ScrnInfoPtr pScrn);
 int ivtvHWGetDepth(ScrnInfoPtr pScrn, int *fbbpp);
@@ -86,7 +86,7 @@
 void ivtvHWRestore(ScrnInfoPtr pScrn);
 void ivtvHWLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices,
     LOCO * colors, VisualPtr pVisual);
-int ivtvHWValidMode(int scrnIndex, DisplayModePtr mode, Bool verbose, int flags);
+ModeStatus ivtvHWValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool verbose, int flags);
 Bool ivtvHWSwitchMode(SWITCH_MODE_ARGS_DECL);
 void ivtvHWAdjustFrame(ADJUST_FRAME_ARGS_DECL);
 Bool ivtvHWEnterVT(VT_FUNC_ARGS_DECL);

--
Happy hacking
Petter Reinholdtsen



Added tag(s) patch. Request was from Petter Reinholdtsen <[email protected]> to [email protected]. (Sat, 01 Mar 2025 08:48:03 GMT) (full text, mbox, link).


Added tag(s) forky. Request was from Paul Gevers <[email protected]> to [email protected]. (Mon, 11 Aug 2025 15:24:39 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Mon Dec 29 05:38:07 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.