corinthia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jan i <j...@apache.org>
Subject Re: incubator-corinthia git commit: Fix compile warning about missing type/init value
Date Sun, 28 Dec 2014 13:11:32 GMT
On 28 December 2014 at 13:39, Peter Kelly <pmkelly@apache.org> wrote:

> Just realised my reply may not get through to the mailing list since I’m
> subscribed under my @apache.org <http://apache.org/> address…
>
Actually it did come through. dev@ is open for all incomming mail, but the
incomming mail will be forwarded to the subscribers only.

private@ is different, if someone mails here a moderator (dennis or me)
will look at the mail and if in a good mood allow it on the list.

rgds
jan i.


>
> > On 28 Dec 2014, at 7:36 pm, Peter Kelly <kellypmk@gmail.com> wrote:
> >
> > Actually it does, but I just saw the for (i; …) which Xcode was giving
> an “Expression result unused” warning. A better fix would be just to remove
> that all together, so we have for (; allGroups[i] && strcmp(argv[2],
> allGroups[i]->name); i++) ; - there’s no need to mention the i variable in
> the initialisation phase. I’ll commit this in shortly.
> >
> > --
> > Dr. Peter M. Kelly
> > kellypmk@gmail.com <mailto:kellypmk@gmail.com>
> > http://www.kellypmk.net/ <http://www.kellypmk.net/>
> >
> > PGP key: http://www.kellypmk.net/pgp-key <
> http://www.kellypmk.net/pgp-key>
> > (fingerprint 5435 6718 59F0 DD1F BFA0 5E46 2523 BAA1 44AE 2966)
> >
> >> On 28 Dec 2014, at 7:31 pm, jan i <jani@apache.org <mailto:
> jani@apache.org>> wrote:
> >>
> >> I believe this will never work.
> >>
> >> "i" is declared a procedure level, and you redeclare it in the "for"
> which
> >> will shadow over the procedure global "i", but after the "for" there is
> an
> >> "if" that looks at "i".
> >>
> >> Not sure what the "int i" in the "for loop" is good for ?
> >>
> >> rgds
> >> jan i.
> >>
> >>
> >> On 28 December 2014 at 13:12, <pmkelly@apache.org <mailto:
> pmkelly@apache.org>> wrote:
> >>
> >>> Repository: incubator-corinthia
> >>> Updated Branches:
> >>>  refs/heads/master 145000d46 -> ddffbd446
> >>>
> >>>
> >>> Fix compile warning about missing type/init value
> >>>
> >>>
> >>> Project:
> http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo <
> http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo>
> >>> Commit:
> >>>
> http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/ddffbd44
> <
> http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/ddffbd44
> >
> >>> Tree:
> >>>
> http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/ddffbd44
> >>> Diff:
> >>>
> http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/ddffbd44
> >>>
> >>> Branch: refs/heads/master
> >>> Commit: ddffbd44655945ba1045cc7bbb8f384fa6695f63
> >>> Parents: 145000d
> >>> Author: Peter Kelly <peter@uxproductivity.com>
> >>> Authored: Sun Dec 28 19:12:24 2014 +0700
> >>> Committer: Peter Kelly <peter@uxproductivity.com>
> >>> Committed: Sun Dec 28 19:12:24 2014 +0700
> >>>
> >>> ----------------------------------------------------------------------
> >>> consumers/dftest/src/main.c | 2 +-
> >>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>> ----------------------------------------------------------------------
> >>>
> >>>
> >>>
> >>>
> http://git-wip-us.apache.org/repos/asf/incubator-corinthia/blob/ddffbd44/consumers/dftest/src/main.c
> >>> ----------------------------------------------------------------------
> >>> diff --git a/consumers/dftest/src/main.c b/consumers/dftest/src/main.c
> >>> index c7e5418..4a030d0 100644
> >>> --- a/consumers/dftest/src/main.c
> >>> +++ b/consumers/dftest/src/main.c
> >>> @@ -353,7 +353,7 @@ int main(int argc, const char **argv)
> >>>         TestGroup *singleGroup[] = { NULL, NULL };
> >>>         int        i = 0;
> >>>
> >>> -        for (i; allGroups[i] && strcmp(argv[2], allGroups[i]->name);
> i++)
> >>> ;
> >>> +        for (int i = 0; allGroups[i] && strcmp(argv[2],
> >>> allGroups[i]->name); i++) ;
> >>>         if (allGroups[i]) {
> >>>           singleGroup[0] = allGroups[i];
> >>>           utrun(singleGroup, 1, 0, NULL);
> >>>
> >>>
> >
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message