aboutsummaryrefslogtreecommitdiffstats
path: root/module/zfs/include
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 09:52:39 -0700
committerBrian Behlendorf <[email protected]>2010-08-27 15:28:32 -0700
commitd6320ddb78fa89c4d0fc2af00ae53c7c70992f96 (patch)
tree8a50c251b955ae31a670835ac0c90cfba6d28752 /module/zfs/include
parentc5b3a7bbcc321846bb15ff73c6fd6f1c483b6aa6 (diff)
Fix gcc c90 compliance warnings
Fix non-c90 compliant code, for the most part these changes simply deal with where a particular variable is declared. Under c90 it must alway be done at the very start of a block. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/include')
-rw-r--r--module/zfs/include/sys/spa.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/module/zfs/include/sys/spa.h b/module/zfs/include/sys/spa.h
index 456ec06dc..7ebbbb2cd 100644
--- a/module/zfs/include/sys/spa.h
+++ b/module/zfs/include/sys/spa.h
@@ -350,13 +350,14 @@ typedef struct blkptr {
int size = BP_SPRINTF_LEN; \
int len = 0; \
int copies = 0; \
+ int d; \
\
if (bp == NULL) { \
len = func(buf + len, size - len, "<NULL>"); \
} else if (BP_IS_HOLE(bp)) { \
len = func(buf + len, size - len, "<hole>"); \
} else { \
- for (int d = 0; d < BP_GET_NDVAS(bp); d++) { \
+ for (d = 0; d < BP_GET_NDVAS(bp); d++) { \
const dva_t *dva = &bp->blk_dva[d]; \
if (DVA_IS_VALID(dva)) \
copies++; \