John, I have mixed thoughts in this space. There are a number of contributions that the contributor clearly did not look at the warnings. In addition, there may be cases where a warning may be ok.
Pat > -----Original Message----- > From: Light, John J > Sent: Tuesday, August 04, 2015 2:04 PM > To: Lankswert, Patrick; Jon A. Cruz; Keane, Erich > Cc: iotivity-dev at lists.iotivity.org > Subject: RE: [dev] warnings! > > Pat, > > The problem with instructing the compiler to treat errors as warnings is that > it > stops the build. I would prefer checking for any warnings over the build only > AFTER everything builds error free. > > Also, might it be better to enforce the higher warning level on resource > first, and > when that gets cleaned up start on service. > > John > > -----Original Message----- > From: Lankswert, Patrick > Sent: Tuesday, August 04, 2015 8:12 AM > To: Light, John J; Jon A. Cruz; Keane, Erich > Cc: iotivity-dev at lists.iotivity.org > Subject: RE: [dev] warnings! > > John, > > I think that Jenkins only looks at the compiler exit code. I do not think > that we > have instructed the compiler to treat warnings as errors... yet. > > Pat > > > -----Original Message----- > > From: iotivity-dev-bounces at lists.iotivity.org [mailto:iotivity-dev- > > bounces at lists.iotivity.org] On Behalf Of Light, John J > > Sent: Tuesday, August 04, 2015 11:07 AM > > To: Jon A. Cruz; Keane, Erich > > Cc: iotivity-dev at lists.iotivity.org > > Subject: Re: [dev] warnings! > > > > I wasn't complaining about the new warning level. I was pointing out > > the irony that we hadn't eliminated the warnings that appeared BEFORE > > we changed the warning level. > > > > I'm surprised Jenkins doesn't complain about warnings. > > > > John > > > > -----Original Message----- > > From: Jon A. Cruz [mailto:jonc at osg.samsung.com] > > Sent: Monday, August 03, 2015 3:35 PM > > To: Keane, Erich; Light, John J > > Cc: iotivity-dev at lists.iotivity.org > > Subject: Re: [dev] warnings! > > > > FYI, the increased warnings had already flagged at least one bug where > > network send errors were being missed due to a check that looked at a > > signed value being less than zero. Catching such a bug in code review > > that should have been flagged by the compiler was the reason the lack > > of -Wextra was noticed in the first place. > > > > First cleanups fixed Ubuntu 14.04 from 9.0k warnings down to 0.6k warnings. > > Similar passes for 12.04 will follow, but as it stands builds were > > only seeing about 2k warnings. > > > > The velocity on warning cleanup should fairly quickly get to the point > > again where it is easy to spot significant issues as (or before) they are > introduced. > > > > > > On 08/03/2015 03:00 PM, Keane, Erich wrote: > > > As far as the 'sea of non-critical warnings', you aren't wrong. > > > However, NOW is sorta the best time to do this, since we are between > > > releases, and it gives us as much time as possible to fix them. All > > > patches to fix warnings are looked on quite favorably :) > > > > > > -Erich > > > > > > > > > On Mon, 2015-08-03 at 21:55 +0000, Light, John J wrote: > > >> I?ve noticed a great increase in the number of warnings during build. > > >> There have been more warnings in recently merged code, but this > > >> lastest increase seems to be the result of ratcheting up the > > >> warning threshold. > > >> > > >> > > >> > > >> I suspect we are well into the territory where critical warnings > > >> won?t be seen because they will be lost in a sea of non-critical > > >> warnings. > > >> > > >> > > >> > > >> Leaving that aside, I have a coding question in this new regime. > > >> > > >> > > >> > > >> A C file I am modifying but didn?t write has the following code: > > >> > > >> > > >> > > >> OCPersistentStorage ps = {}; > > >> > > >> ps.open = client_fopen; > > >> > > >> ps.read = fread; > > >> > > >> ps.write = fwrite; > > >> > > >> ps.close = fclose; > > >> > > >> ps.unlink = unlink; > > >> > > >> > > >> > > >> This gets a warning about each line, like: > > >> > > >> > > >> > > >> warning: missing initializer for member > > >> 'OCPersistentStorage::open' > > >> > > >> > > >> > > >> I can eliminate the warnings by coding it thus: > > >> > > >> > > >> > > >> OCPersistentStorage ps = { client_fopen, fread, fwrite, fclose, > > >> unlink }; > > >> > > >> OCRegisterPersistentStorageHandler(&ps); > > >> > > >> > > >> > > >> But this seems more fragile since the ordering matters. > > >> > > >> > > >> > > >> Is there a C initialization method I?m missing? > > >> > > >> > > >> > > >> John > > >> > > >> > > >> _______________________________________________ > > >> iotivity-dev mailing list > > >> iotivity-dev at lists.iotivity.org > > >> https://lists.iotivity.org/mailman/listinfo/iotivity-dev > > > > > > _______________________________________________ > > > iotivity-dev mailing list > > > iotivity-dev at lists.iotivity.org > > > https://lists.iotivity.org/mailman/listinfo/iotivity-dev > > > > > > > -- > > Jon A. Cruz - Senior Open Source Developer Samsung Open Source Group > > jonc at osg.samsung.com > _______________________________________________ > > iotivity-dev mailing list > > iotivity-dev at lists.iotivity.org > > https://lists.iotivity.org/mailman/listinfo/iotivity-dev
