From 7975fe18ee976a168ae995a0060c80ecc0c031e8 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 15 Sep 2012 10:21:47 +0200 Subject: [PATCH] isl_union_map.c: plain_injective_on_range: silence clang warning Recent clangs complain that "n" may be used uninitialized in the call to free_isl_fixed_map_array. However, this only happens data.v is NULL, in which case free_isl_fixed_map_array does not even look at n. By moving the initialization of n up, we can silence this warning. Signed-off-by: Sven Verdoolaege --- isl_union_map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/isl_union_map.c b/isl_union_map.c index a2973bb5..c2f1faea 100644 --- a/isl_union_map.c +++ b/isl_union_map.c @@ -2228,10 +2228,10 @@ static int plain_injective_on_range(__isl_take isl_union_map *umap, ctx = isl_union_map_get_ctx(umap); + n = isl_union_map_n_map(umap); if (!umap) goto error; - n = isl_union_map_n_map(umap); if (n <= 1) { isl_union_map_free(umap); return 1; -- 2.11.4.GIT