Skip to content

Commit a71ba61

Browse files
committed
fabrics: Declare loop index at the beginning of the block
The gcc in Centos 6.10 complains with nvme/fabrics.c:909: error: ‘for’ loop initial declarations are only allowed in C99 mode nvme/fabrics.c:909: note: use option -std=c99 or -std=gnu99 to compileyour code Let's declare the index at the beginning of the basic block. Signed-off-by: Daniel Wagner <[email protected]>
1 parent cfc9f9b commit a71ba61

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/nvme/fabrics.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,9 +906,12 @@ static int uuid_from_product_uuid(char *system_uuid)
906906
20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,
907907
-1 /* sentinel */
908908
};
909-
for (unsigned int i = 0; swaptbl[i] != -1; i++)
909+
int i;
910+
911+
for (i = 0; swaptbl[i] != -1; i++)
910912
system_uuid[i] = line[swaptbl[i]];
911913
system_uuid[UUID_SIZE-1] = '\0';
914+
912915
ret = 0;
913916
}
914917

0 commit comments

Comments
 (0)