Control: tags -1 upstream fixed-upstream patch

On Wed, Jul 03, 2024 at 12:46:36PM +0000, Matthias Klose wrote:
> [...]
> src/tuxpaint.c: In function ‘do_new_dialog’:
> src/tuxpaint.c:22025:54: error: passing argument 3 of 
> ‘autoscale_copy_smear_free’ from incompatible pointer type 
> [-Wincompatible-pointer-types]
> 22025 |               autoscale_copy_smear_free(img, canvas, SDL_BlitSurface);
>       |                                                      ^~~~~~~~~~~~~~~
>       |                                                      |
>       |                                                      int 
> (*)(SDL_Surface *, const SDL_Rect *, SDL_Surface *, SDL_Rect *)
> src/tuxpaint.c:12998:52: note: expected ‘int (*)(SDL_Surface *, SDL_Rect *, 
> SDL_Surface *, SDL_Rect *)’ but argument is of type ‘int (*)(SDL_Surface *, 
> const SDL_Rect *, SDL_Surface *, SDL_Rect *)’
> 12998 |                                       int SDLCALL(*blit) (SDL_Surface 
> * src,
>       |                                       
> ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
> 12999 |                                                           SDL_Rect * 
> srcrect, SDL_Surface * dst, SDL_Rect * dstrect))
>       |                                                           
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> src/tuxpaint.c:22080:54: error: passing argument 3 of 
> ‘autoscale_copy_smear_free’ from incompatible pointer type 
> [-Wincompatible-pointer-types]
> 22080 |               autoscale_copy_smear_free(img, canvas, SDL_BlitSurface);
>       |                                                      ^~~~~~~~~~~~~~~
>       |                                                      |
>       |                                                      int 
> (*)(SDL_Surface *, const SDL_Rect *, SDL_Surface *, SDL_Rect *)
> src/tuxpaint.c:12998:52: note: expected ‘int (*)(SDL_Surface *, SDL_Rect *, 
> SDL_Surface *, SDL_Rect *)’ but argument is of type ‘int (*)(SDL_Surface *, 
> const SDL_Rect *, SDL_Surface *, SDL_Rect *)’
> 12998 |                                       int SDLCALL(*blit) (SDL_Surface 
> * src,
>       |                                       
> ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
> 12999 |                                                           SDL_Rect * 
> srcrect, SDL_Surface * dst, SDL_Rect * dstrect))
>       |                                                           
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> [...]
> src/tuxpaint.c: In function ‘load_embedded_data’:
> src/tuxpaint.c:25969:57: error: passing argument 3 of 
> ‘autoscale_copy_smear_free’ from incompatible pointer type 
> [-Wincompatible-pointer-types]
> 25969 |             autoscale_copy_smear_free(org_surf, canvas, 
> SDL_BlitSurface);
>       |                                                         
> ^~~~~~~~~~~~~~~
>       |                                                         |
>       |                                                         int 
> (*)(SDL_Surface *, const SDL_Rect *, SDL_Surface *, SDL_Rect *)
> src/tuxpaint.c:12998:52: note: expected ‘int (*)(SDL_Surface *, SDL_Rect *, 
> SDL_Surface *, SDL_Rect *)’ but argument is of type ‘int (*)(SDL_Surface *, 
> const SDL_Rect *, SDL_Surface *, SDL_Rect *)’
> 12998 |                                       int SDLCALL(*blit) (SDL_Surface 
> * src,
>       |                                       
> ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
> 12999 |                                                           SDL_Rect * 
> srcrect, SDL_Surface * dst, SDL_Rect * dstrect))
>       |                                                           
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> src/tuxpaint.c:26028:81: error: passing argument 3 of 
> ‘autoscale_copy_smear_free’ from incompatible pointer type 
> [-Wincompatible-pointer-types]
> 26028 |                           autoscale_copy_smear_free(aux_surf, 
> img_starter_bkgd, SDL_BlitSurface);
>       |                                                                       
>           ^~~~~~~~~~~~~~~
>       |                                                                       
>           |
>       |                                                                       
>           int (*)(SDL_Surface *, const SDL_Rect *, SDL_Surface *, SDL_Rect *)
> src/tuxpaint.c:12998:52: note: expected ‘int (*)(SDL_Surface *, SDL_Rect *, 
> SDL_Surface *, SDL_Rect *)’ but argument is of type ‘int (*)(SDL_Surface *, 
> const SDL_Rect *, SDL_Surface *, SDL_Rect *)’
> 12998 |                                       int SDLCALL(*blit) (SDL_Surface 
> * src,
>       |                                       
> ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
> 12999 |                                                           SDL_Rect * 
> srcrect, SDL_Surface * dst, SDL_Rect * dstrect))
>       |                                                           
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> src/tuxpaint.c: In function ‘export_gif’:
> src/tuxpaint.c:29526:54: error: passing argument 3 of 
> ‘autoscale_copy_smear_free’ from incompatible pointer type 
> [-Wincompatible-pointer-types]
> 29526 |               autoscale_copy_smear_free(img, screen, SDL_BlitSurface);
>       |                                                      ^~~~~~~~~~~~~~~
>       |                                                      |
>       |                                                      int 
> (*)(SDL_Surface *, const SDL_Rect *, SDL_Surface *, SDL_Rect *)
> src/tuxpaint.c:12998:52: note: expected ‘int (*)(SDL_Surface *, SDL_Rect *, 
> SDL_Surface *, SDL_Rect *)’ but argument is of type ‘int (*)(SDL_Surface *, 
> const SDL_Rect *, SDL_Surface *, SDL_Rect *)’
> 12998 |                                       int SDLCALL(*blit) (SDL_Surface 
> * src,
>       |                                       
> ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
> 12999 |                                                           SDL_Rect * 
> srcrect, SDL_Surface * dst, SDL_Rect * dstrect))
>       |                                                           
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> [...]

With the attached minimized patch this tuxpaint version compiles again
with gcc-14. It seems this was first fixed upstream in 0.9.29, cf.
<https://sourceforge.net/p/tuxpaint/tuxpaint/ci/9d70b5837cc307e6c9fe80e6e7dcabf7750b1d45/>.

Cheers,
Flo
Index: tuxpaint-0.9.28-sdl2/src/tuxpaint.c
===================================================================
--- tuxpaint-0.9.28-sdl2.orig/src/tuxpaint.c
+++ tuxpaint-0.9.28-sdl2/src/tuxpaint.c
@@ -12924,7 +12924,7 @@ static double loadinfo(const char *const
 /**
  * FIXME
  */
-static int SDLCALL NondefectiveBlit(SDL_Surface * src, SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)
+static int SDLCALL NondefectiveBlit(SDL_Surface * src, const SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect)
 {
   int dstx = 0;
   int dsty = 0;
@@ -12996,7 +12996,7 @@ static int SDLCALL NondefectiveBlit(SDL_
  */
 static void autoscale_copy_smear_free(SDL_Surface * src, SDL_Surface * dst,
                                       int SDLCALL(*blit) (SDL_Surface * src,
-                                                          SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect))
+                                                          const SDL_Rect * srcrect, SDL_Surface * dst, SDL_Rect * dstrect))
 {
   SDL_Surface *src1;
   SDL_Rect dest;

Attachment: signature.asc
Description: PGP signature

Reply via email to