Re: [hatari-devel] windows build failing on cirrus-ci

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 24/04/2024 à 17:29, Christian Zietz a écrit :
Nicolas Pomarède schrieb:

since patch "Add autoload support also for TOS debug symbols"

the windows build is failing with lots of similar errors about size_t /
int conversions :

see https://cirrus-ci.com/task/5677615988604928

for example

src\debug\symbols-common.c(81,1): warning C4267: 'initializing':
conversion from 'size_t' to 'int', possible loss of data
[C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\src\debug\Debug.vcxproj]

These warnings were already there before well the patch that you mentioned: https://cirrus-ci.com/task/4519018495737856


OK, I didn't notice it before as it didn't make the build fail


But the *error* that causes the build to fail lies somewhere else:


C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\src\debug\symbols.c(832,20): error C2057: expected constant expression [C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\src\debug\Debug.vcxproj]

This line: https://github.com/hatari/hatari/blame/df407dcb68ec186a495a57d686912f0805233cc1/src/debug/symbols.c#L832

Off the top of your head, I don't know which version of the C language is required to support this construct; but apparently the VS project does not like it.

Yes, the problem is in the new function "loadSymFile"

I don't know if this is supported in a more recent version of visual C than the one used in cirrus-ci, but one possible solution would be to replace :

char symfile[len+1];

by :

char *symfile;
symfile = malloc ( len+1 )
if ( !symfile )
    return NULL;

Eero, what do you think ?

Nicolas





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/