# Emscripten Hide Specific Warning

This topic is 1668 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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)


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

Edited by jeff8j

##### Share on other sites

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

Edited by Karsten_

##### Share on other sites

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?

##### Share on other sites

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

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).

Edited by Karsten_

##### Share on other sites

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