• Bug#1099179: komposter: FTBFS on amd64: patch.c:575:11: error: assignme

    From Adrian Bunk@21:1/5 to Sebastian Ramacher on Sun Mar 2 03:30:01 2025
    Control: tags -1 patch

    On Sat, Mar 01, 2025 at 12:20:22PM +0100, Sebastian Ramacher wrote:
    Source: komposter
    Version: 0+git20201216+ds-6
    Severity: serious
    ...
    patch.c:575:11: error: assignment to ‘unsigned int *’ from incompatible pointer type ‘long unsigned int *’ [-Wincompatible-pointer-types]
    575 | fptr=(unsigned long*)(&rf);
    | ^
    ...

    A fix is attached.

    cu
    Adrian

    Description: u32 always matches int in Debian, and fix a usage in patch.c Author: Adrian Bunk <bunk@debian.org>

    --- komposter-0+git20201216+ds.orig/arch.h
    +++ komposter-0+git20201216+ds/arch.h
    @@ -12,13 +12,13 @@


    // dword size depending on platform
    -#if __x86_64__
    +//#if __x86_64__
    #define u32 unsigned int
    #define s32 int
    -#else
    - #define u32 unsigned long
    - #define s32 long
    -#endif
    +//#else
    +// #define u32 unsigned long
    +// #define s32 long
    +//#endif


    // Apple Mac OS X
    --- komposter-0+git20201216+ds.orig/patch.c
    +++ komposter-0+git20201216+ds/patch.c
    @@ -572,7 +572,7 @@ void patch_draw_modulator(void)
    i=sscanf(modeditbox, "%f", &rf);
    if (i==1) {
    rf=knob_scale2float(mod[csynth][mi].scale, rf);
    - fptr=(unsigned long*)(&rf);
    + fptr=(u32*)(&rf);
    fmask=0xffffffff; j=32;
    while(j>modquantifier[csynth][cpatch[csynth]][mi]) { fmask<<=1; j--; }
    *fptr&=fmask;

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)