betajaen / gorilla

Minimal HUD and Overlay replacement system for Ogre 1.x only
60 stars 11 forks source link

Fixed an error that caused -Wall to issue warnings #4

Closed HeatherSoron closed 12 years ago

HeatherSoron commented 12 years ago

The member mScale was initialized in the wrong order in hte Gorilla::Screen constructor. Fixed that.

This closes issue #3 on betajaen/gorilla. I thought it'd take a lot more to fix that, but apparently it was just a one-line error :).

Note that gcc still freaks out at the #pragma warning on line 34 of Gorilla.cpp if I compile with -Wall, but -Wno-unknown-pragmas is sufficient to stop that from throwing a warning. I presume that the #pragma warning bit is useful for other people, so I'm just gonna use -Wno-unknown-pragmas in my project.

merlinblack commented 12 years ago

Nice! I'll merge your changes in. I'll also look at adding -Wall and -Wno-unknown-pragmas to the linux makefile

HeatherSoron commented 12 years ago

Sounds good :). -Wall isn't strictly necessary, but it IS handy for libraries to be well-behaved on any warning level.

merlinblack commented 12 years ago

What version of gcc where you using just out of interest? I'm using 4.6.1, and adding -Wall still gives a load of warnings.

HeatherSoron commented 12 years ago

4.4.3 on Ubuntu. Perhaps I should upgrade, then, if newer versions are giving additional warnings. I also didn't check the example code for -Wall friendliness, although when I tried that just now, I didn't get any warnings.

merlinblack commented 12 years ago

I would have thought 4.4.3 would not be that much different with warnings.

HeatherSoron commented 12 years ago

Yeah, that's what I would have thought, too... maybe you could give me some examples of the warnings you're getting, and I can see if that sounds like something I've seen before?

merlinblack commented 12 years ago

I'm just recompiling ogre right now - however I got a bunch like the one you fixed, a few unused variables, and a couple of unsigned / signed comparisons.

HeatherSoron commented 12 years ago

Huh, THAT sounds odd, because those are the kinds of things that gcc warns me about with -Wall. What files?

merlinblack commented 12 years ago

This was with compiling the examples as well however.

HeatherSoron commented 12 years ago

Oh, hey, OgreConsoleForGorilla throws a lot of warnings, too. Precisely the sort that you mentioned, too. Well, I'm trying to get this working with a non-OIS app first, but if those haven't been fixed when I'm done with integration, I'll copy the fixes to the OIS-using version and send another pull request.