Hello,
I'm trying to compile the "pixel01.c", from cpcmania's tutorial :
http://www.cpcmania.com/Docs/Programming/Programming.htm
But, i want to make it from CPCTELERA 1.4, with SDCC 3.5:
After the make, there is a warning :
/share/sdcc/include/stdlib.h:84: warning 85: in function aligned_alloc unreferenced function argument : 'alignment'
But, the DSK is created.
The program is running correctly...
What do you think about this message ?
Thanks for you help.
Gryken.
Hello,
the warning is from this function (stdlib.h) :
#if __STDC_VERSION__ >= 201112L
inline void *aligned_alloc(size_t alignment, size_t size)
{
return malloc(size);
}
#endif
It indicates that alignment is not used, you can ignore the warning.
If you want to totally remove this warning, use only cpctelera functions.
Replace :
rand()
with cpct_rand()
And replace :
#include <stdio.h>
#include <stdlib.h>
with
#include <cpctelera.h>
That all :D
And more you have saved some bytes in your program because cpctelera functions are highly optimized for CPC
Thanks for the hint.
It works for me.