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 12:31:02 GMT
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> 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
> Commit:
> 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