Compile error with clean.c

5 years 3 months ago #1618 by 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

Please Log in to join the conversation.

5 years 3 months ago #1620 by spallg1
Replied by spallg1 on topic 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!

Please Log in to join the conversation.

5 years 3 months ago - 5 years 3 months ago #1623 by Ray
Replied by Ray on topic 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.

Please Log in to join the conversation.

Time to create page: 0.056 seconds
Powered by Kunena Forum
Joomla SEF URLs by Artio