| I'd say you either change the signature or you silence the relevant warning.
Happy for the signature to change and then we'll see if it breaks compilation elsewhere.
Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
> On 4 Aug 2019, at 13:32, John wrote:
>
> The compiler is gcc (Debian 8.3.0-6) which could be relevant. Hardware
> is x86_64.
>
> The code in Top/threads.c lines 180-192 fails to compiler with the
> error
>
> /home/jpff/csound6/Top/threads.c: In function ‘csoundCreateThread’:
> /home/jpff/csound6/Top/threads.c:185:25: error: cast between incompatible function types from ‘uintptr_t (*)(void *)’ {aka ‘long unsigned int (*)(void *)’} to void * (*)(void *)’ [-Werror=cast-function-type]
> (void *(*)(void *))threadRoutine, userdata)) {
> ^
> /home/jpff/csound6/Top/threads.c: At top level:
> cc1: error: unrecognized command line option ‘-Wno-strict-aliasing-O3’ [-Werror]
> cc1: all warnings being treated as errors
>
> I have tried various ways to overcome this but with no success.
> Anyone any ideas?
>
> The only thing I have thought of is changing the signature of csoundCreateThread
>
> it is OK with gcc7.4.0 on my openSuSE machines.
> ==John ffitch
|