aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Uvarov <maxim.uvarov@linaro.org>2015-02-20 21:20:10 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-02-20 21:27:37 +0300
commit898f42e3a619461a69ca7f16eee3f985fa8287c1 (patch)
tree1130828f393af63aca2bdc0fd500287e7d8a113b
parent1ddfc9a9a1a278fcc8e5db8b1a23c402cee3c33d (diff)
linux-generic: pool set seg_len to 0
gcc 4.9 compiles current code fine, but gcc 4.7 fails with: odp_pool.c:293:20: error: 'seg_len' may be used uninitialized in this function Problem found with gcc 4.7 and make distcheck command which added additional flags for odp compilation. If newer gcc does not warn that variable can be used uninitialized (not for packet case in this function), it looks like compiler bug. Init it to 0 because pool creation is not performance function. Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
-rw-r--r--platform/linux-generic/odp_pool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/linux-generic/odp_pool.c b/platform/linux-generic/odp_pool.c
index 8da3801b4..422ff2be7 100644
--- a/platform/linux-generic/odp_pool.c
+++ b/platform/linux-generic/odp_pool.c
@@ -136,7 +136,7 @@ odp_pool_t odp_pool_create(const char *name,
ODP_CACHE_LINE_SIZE_ROUNDUP(init_params->udata_size) :
0;
- uint32_t blk_size, buf_stride, buf_num, seg_len;
+ uint32_t blk_size, buf_stride, buf_num, seg_len = 0;
uint32_t buf_align =
params->type == ODP_POOL_BUFFER ? params->buf.align : 0;