syoyo / tinyobjloader-c

Header only tiny wavefront .obj loader in pure C99
412 stars 60 forks source link

fpermissing warning #9

Closed bbblitz closed 5 years ago

bbblitz commented 5 years ago

When compiling with gcc with -Wall -Werror, I got:

In file included from src/shared/util/tinyobj.cpp:3:0:
lib/tinyobjloader-c/tinyobj_loader_c.h: In function 'int tinyobj_parse_obj(tinyobj_attrib_t*, tinyobj_shape_t**, size_t*, tinyobj_material_t**, size_t*, const char*, size_t, unsigned int)':
lib/tinyobjloader-c/tinyobj_loader_c.h:1393:23: error: invalid conversion from 'void*' to 'tinyobj_shape_t*' [-fpermissive]
     (*shapes) = malloc(sizeof(tinyobj_shape_t) * (n + 1));
                 ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make: *** [Makefile:187: build/client/util/tinyobj.o] Error 1

Will send PR in a moment.

syoyo commented 5 years ago

Will send PR in a moment.

Thanks! I've merged PR : https://github.com/syoyo/tinyobjloader-c/pull/10