corinthia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmke...@apache.org
Subject incubator-corinthia git commit: Correct fix for unused variable result warning
Date Sun, 28 Dec 2014 12:36:36 GMT
Repository: incubator-corinthia
Updated Branches:
  refs/heads/master ddffbd446 -> 01cbf0fdf


Correct fix for unused variable result warning

Xcode was giving an 'Expression result unused' warning because a
variable 'i' was referenced in the initialisation part of a for loop. We
actually don't need to reference it there at all, and can just leave the
initialisation part empty. This both works and avoids Xcode's warning.


Project: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/commit/01cbf0fd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/tree/01cbf0fd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-corinthia/diff/01cbf0fd

Branch: refs/heads/master
Commit: 01cbf0fdf733a04e1360fcd9c6c2e0e2c9f9dd67
Parents: ddffbd4
Author: Peter Kelly <peter@uxproductivity.com>
Authored: Sun Dec 28 19:35:03 2014 +0700
Committer: Peter Kelly <peter@uxproductivity.com>
Committed: Sun Dec 28 19:35:03 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/01cbf0fd/consumers/dftest/src/main.c
----------------------------------------------------------------------
diff --git a/consumers/dftest/src/main.c b/consumers/dftest/src/main.c
index 4a030d0..e736e2f 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 (int i = 0; allGroups[i] && strcmp(argv[2], allGroups[i]->name); i++)
;
+        for (; allGroups[i] && strcmp(argv[2], allGroups[i]->name); i++) ;
         if (allGroups[i]) {
           singleGroup[0] = allGroups[i];
           utrun(singleGroup, 1, 0, NULL);


Mime
View raw message