Skip to content

Commit

Permalink
fix gcc compiler error about for loop initial declaration
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgiy Frolov committed May 25, 2017
1 parent 7b45e7f commit c7ed139
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/clients/Skeleton.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ void mySkeletonCallback(void *userdata, const OSVR_TimeValue *timestamp,

printf("\tnumJoints: %d, numBones: %d\n", numJoints, numBones);

for (OSVR_SkeletonJointCount joint = 0; joint < numJoints; joint++) {
OSVR_SkeletonJointCount joint;
for (joint = 0; joint < numJoints; joint++) {
uint32_t len = 0;
OSVR_SkeletonJointCount jointId = 0;
rc = osvrClientGetSkeletonAvailableJointId(skel, joint, &jointId);
Expand Down Expand Up @@ -112,7 +113,8 @@ void mySkeletonCallback(void *userdata, const OSVR_TimeValue *timestamp,
osvrQuatGetW(&jointState.pose.rotation));
}

for (OSVR_SkeletonBoneCount bone = 0; bone < numBones; bone++) {
OSVR_SkeletonBoneCount bone;
for (bone = 0; bone < numBones; bone++) {
uint32_t len = 0;
OSVR_SkeletonBoneCount boneId = 0;
rc = osvrClientGetSkeletonAvailableBoneId(skel, bone, &boneId);
Expand Down

0 comments on commit c7ed139

Please sign in to comment.