Hello, On Wed, Sep 18, 2013 at 6:09 PM, Tom Hacohen <tom.haco...@samsung.com> wrote: > On 18/09/13 06:47, Lucas De Marchi wrote: >> On Tue, Sep 17, 2013 at 4:30 AM, Stefan Schmidt <s.schm...@samsung.com> >> wrote: >>> Hello. >>> >>> On 09/17/2013 07:44 AM, Chris Michael - Enlightenment Git wrote: >>>> devilhorns pushed a commit to branch master. >>>> >>>> commit 64bc97c53c5c3772595f9d2321f9e19590d8a477 >>>> Author: Chris Michael <cp.mich...@samsung.com> >>>> Date: Mon Sep 16 11:40:30 2013 +0100 >>>> >>>> Remove __UNUSED__ from function declaration where parameter is >>>> actually used. >>> >>> This brings an old topic back into my mind. >>> >>> Its not the first time we eagerly tagged parameters as unused because >>> gcc warned about it and later started to use them without removing the >>> unused label. This has the potential to screw us badly as it is up to >>> the compiler to decide what to do with the parameter here. >>> >>> Given how many callback and other signatures we have with user_data or >>> other unused parameters we end up with 3630 EINA_UNUSED and even 71 >>> __UNUSED__ in efl alone. All with the potential to be used at some point >>> but forgotten to remove the label. >>> >>> My proposal would be to use -Wno-unused-parameter in our CFLAGS to >>> disable this warning and remove all EINA_UNUSED and __UNUSED__ from >>> parameters. >> >> +1 >> >> We use callbacks a lot. And often enough we don't use one parameter or >> another. Having to *silence* the compiler on every single place about >> a stupid warning is useless. I'm all in favor or silence it in the >> build directly. >> >>> >>> I know it has the downside that in the rare case where you add a >>> parameter to a signature yourself (read: not using an existing function >>> signature) you might add it and forgot to use it. Which will not >>> reported as warning in this case. >> >> eldbus was made entirely passing -Wno-unused-parameter in CFLAGS. When >> merging to EFL and forced to drop the flag, I proved my point: there >> no one single place in which the warning would point to an error. >> >> Most of the projects I'm involved with are for long disabling this warning. > > Disable it if you'd like, I'll add this to Stefan's shelf. I don't > really care one way or the other. I think it helps producing better > code, I also hate the pain that comes with it when working with > callbacks. This means it's not a clean-cut decision for me as well, I'm > just leaning towards keeping the warnings.
I have to agree with you on that subject to. Either that or you are going to give me more borking power ! -- Cedric BAIL ------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel