• Create Account

## Emscripten Hide Specific Warning

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

4 replies to this topic

### #1jeff8j  Members

787
Like
0Likes
Like

Posted 26 June 2013 - 09:59 AM

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, 26 June 2013 - 10:02 AM.

### #2Karsten_  Members

2306
Like
0Likes
Like

Posted 26 June 2013 - 11:04 AM

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_, 26 June 2013 - 11:06 AM.

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.

### #3jeff8j  Members

787
Like
0Likes
Like

Posted 26 June 2013 - 11:11 AM

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?

### #4Karsten_  Members

2306
Like
0Likes
Like

Posted 26 June 2013 - 04:51 PM

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_, 26 June 2013 - 04:52 PM.

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.

### #5jeff8j  Members

787
Like
0Likes
Like

Posted 26 June 2013 - 04:54 PM

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