[-fpermissive] #666
-
|
How can I resolve this error: ok_png.cpp:125:59: error: invalid conversion from 'void*' to 'uint8_t*' {aka 'unsigned char*'} [-fpermissive] #define ok_alloc(decoder, size) (decoder)->allocator.alloc((decoder)->allocator_user_data, (size)) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
Beta Was this translation helpful? Give feedback.
-
|
Hello rsta2, I tried that but I get a new error message, as follows: ok_png.cpp: In function 'bool ok_png_read_data(ok_png_decoder*, uint32_t)': Just to let you know I'm porting a png decoder example from github. |
Beta Was this translation helpful? Give feedback.
I guess it's this project?
This solves this problem, but you will get more errors. You have to cast the result of every
ok_alloc()occurrence to the expected result type, if it is notuint8_t*. C is not that permissive and can assign avoid*to any pointer variable, but C++ is.