Compile error with clean.c

5 años 4 meses antes #1618 por spallg1
Hi-pedal pi newbie trying to compile clean.c and am getting a couple errors, hoping someone can help.

Compile error reads “pointer targets in passing argument 1 of ‘bcm2835_spi_tranfernb’ differ in signedness [-wpointer-sign]”. Looks like the compiler is expecting char* but is getting uint8* (aka unsigned char*). There are 4 instances of this error, and one about an unused variable ‘PUSH1_val’, which may or may not be related.

I’m using geany v1.29, bcm library v1.50 and can compile the examples spi.c and blink.c.

Any suggestions appreciated.

Thanks, Graham

Por favor, Identificarse para unirse a la conversación.

5 años 4 meses antes #1620 por spallg1
Respuesta de spallg1 sobre el tema Compile error with clean.c
So if the compiler says it wants a char, give it a char! Changed miso and MOSI to chars and it compiles just fine.

The unused variable was a declaration for the pb switches which are not used in the clean effect (go figure).

Hopefully some info that others find useful. Guess I am 24hrs cleverer than I was then!

Por favor, Identificarse para unirse a la conversación.

5 años 4 meses antes - 5 años 4 meses antes #1623 por Ray
Respuesta de Ray sobre el tema Compile error with clean.c
Thanks for sharing your issue. Its weird to have any compiler problem because all the codes are verified and checked. The usual problem is to have the BCM2835 not properly installed, using the image file of the OS that we have online fix all the problems (so far).
I will stay tuned to see if anything else like this appears again.

Por favor, Identificarse para unirse a la conversación.

Tiempo de carga de la página: 0.065 segundos
Gracias a Foro Kunena
Joomla SEF URLs by Artio