Emscripten Hide Specific Warning

Started by
3 comments, last by user0 10 years, 10 months ago

I am compiling with emscripten and getting a warning that doesnt seem to matter and no matter what I do I cant workaround it and so im just trying to hide it so I dont have to waid through a bunch of warnings to find errors when they occur.

The warning im getting is this


Warning: Casting a function pointer type to a potentially incompatible one (use -s VERBOSE=1 to see more)
Warning: See https://github.com/kripken/emscripten/wiki/CodeGuidlinesAndLimitations#function-pointer-issues for more information on dangerous function pointer casts

I would be happy to find a solution rather than hiding the warnings but I dont think its possible without alot of changes.

Here is part of freetype that is causing this error


cur = (const FT_Module_Class* const*)FT_DEFAULT_MODULES_GET;

No matter how I change it I cant workaround the warning.

Heres how im compiling my code

emscripten-master/em++ -s FULL_ES2=1 --minify 1 -w -fpermissive entry.cpp -o "out.html"

So a solution or help hiding this warning would be greatly appreciated! Thanks

Advertisement

Had a quick look and it seems that macro expands to a pointer of type BasePIC*. (in freetype/src/base/basepic.h) I don't really suggest you use that as a solution, but try casting it to that and seeing if the warning disappears.

I do my own font rendering with Emscripten but I know that Emscripten's javascript wrappers sometimes do funny things

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

Hi Karsten

Im using freetype 2.4.11 it doesnt seem to have BasePIC

cur = (BasePIC*)FT_DEFAULT_MODULES_GET;

that resulted in use of undeclared identifier 'BasePIC'

Ill spend some time trying to get 2.5 going and see what it does then. Any other thoughts?

I had a quick look at the system includes of my emcc install and I cannot even seem to find freetype2. I assume my install is a little too old.

You might want to try on the emscripten mailing lists

http://groups.google.com/group/emscripten-discuss

They are a helpful bunch and will probably be able to help you solve your problem pretty quickly (assuming it is an emscripten issue. Otherwise perhaps someone else on these forums can shed some light).

http://tinyurl.com/shewonyay - Thanks so much for those who voted on my GF's Competition Cosplay Entry for Cosplayzine. She won! I owe you all beers :)

Mutiny - Open-source C++ Unity re-implementation.
Defile of Eden 2 - FreeBSD and OpenBSD binaries of our latest game.

Thanks Karsten

It wasnt part of emscripten I added it in. I managed to get the warnings to go away by updating to 2.4.12 I havent found a compatible 2.5 yet though. I havent had time to test the new version out but I think its pretty safe to assume it works. Thank Again

This topic is closed to new replies.

Advertisement