# Compiler warnings (-pedantic) \[patch attached\]

**URL:** <https://discourse.libsdl.org/t/compiler-warnings-pedantic-patch-attached/19404>\
**Category:** SDL Development\
**Created:** [February 26, 2013, 1:33pm UTC](https://discourse.libsdl.org/t/compiler-warnings-pedantic-patch-attached/19404 "2013-02-26T13:33:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Gerhardy](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/martin_gerhardy/32/591_2.png) [@Martin\_Gerhardy](https://discourse.libsdl.org/u/Martin_Gerhardy)\
**Post date:** [February 26, 2013, 1:33pm UTC](https://discourse.libsdl.org/t/compiler-warnings-pedantic-patch-attached/19404/1 "2013-02-26T13:33:39Z")

</div>

Hi,

bugzilla throws an internal server error for me - so I try it via  
mailinglist:

If you install the joystick headers - you get warnings if your product  
is compiled with -pedantic.

The attached patch fixes this  
-------------- next part --------------  
A non-text attachment was scrubbed…  
Name: fixed-pedantic-compiler-warning-and-renamed-struct-variables.diff  
Type: text/x-patch  
Size: 3109 bytes  
Desc: not available  
URL: [http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130226/4cd69167/attachment.bin](http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20130226/4cd69167/attachment.bin)

---

<div class="post-metadata">

**Author:** ![Sik\_the\_hedgehog](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/db5fbb/32.png) [@Sik\_the\_hedgehog](https://discourse.libsdl.org/u/Sik_the_hedgehog)\
**Post date:** [February 26, 2013, 1:43pm UTC](https://discourse.libsdl.org/t/compiler-warnings-pedantic-patch-attached/19404/2 "2013-02-26T13:43:34Z")

</div>

OK, I can see where this warning comes from (nameless union), but I  
don’t understand what this specific change has to do with that:

- SDL\_GameControllerBindType m\_eBindType;

- SDL\_GameControllerBindType bindType;

Was there any reason for that change? (although I agree that I prefer  
it without the Hungarian notation)

2013/2/26, Martin Gerhardy \<martin.gerhardy at [gmail.com](http://gmail.com)\>:\> Hi,

> bugzilla throws an internal server error for me - so I try it via  
> mailinglist:
> 
> If you install the joystick headers - you get warnings if your product  
> is compiled with -pedantic.
> 
> The attached patch fixes this

---

<div class="post-metadata">

**Author:** ![John6](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/j/b5e925/32.png) [@John6](https://discourse.libsdl.org/u/John6)\
**Post date:** [February 26, 2013, 3:33pm UTC](https://discourse.libsdl.org/t/compiler-warnings-pedantic-patch-attached/19404/3 "2013-02-26T15:33:51Z")

</div>

Isn’t the point of -pedantic to emit compiler warnings so silly that a  
reasonable person would ignore them?On 02/26/2013 08:43 AM, Sik the hedgehog wrote:

> OK, I can see where this warning comes from (nameless union), but I  
> don’t understand what this specific change has to do with that:
> 
> - SDL\_GameControllerBindType m\_eBindType;
> 
> - SDL\_GameControllerBindType bindType;
> 
> Was there any reason for that change? (although I agree that I prefer  
> it without the Hungarian notation)
> 
> 2013/2/26, Martin Gerhardy \<martin.gerhardy at [gmail.com](http://gmail.com)\>:
> 
> > Hi,
> > 
> > bugzilla throws an internal server error for me - so I try it via  
> > mailinglist:
> > 
> > If you install the joystick headers - you get warnings if your product  
> > is compiled with -pedantic.
> > 
> > The attached patch fixes this
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![Martin\_Gerhardy](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/martin_gerhardy/32/591_2.png) [@Martin\_Gerhardy](https://discourse.libsdl.org/u/Martin_Gerhardy)\
**Post date:** [February 26, 2013, 4:16pm UTC](https://discourse.libsdl.org/t/compiler-warnings-pedantic-patch-attached/19404/4 "2013-02-26T16:16:54Z")

</div>

No, the only reason is that this is exposed to the user - and it’s not  
the notation that is used for other “external” types.Am 26.02.2013 14:43, schrieb Sik the hedgehog:

> OK, I can see where this warning comes from (nameless union), but I  
> don’t understand what this specific change has to do with that:
> 
> - SDL\_GameControllerBindType m\_eBindType;
> 
> - SDL\_GameControllerBindType bindType;
> 
> Was there any reason for that change? (although I agree that I prefer  
> it without the Hungarian notation)
