Avoid `uninitialized` warning within TRY block. The compiler can't tell that either the TRY block will assign to `retvalCF` successfully or an error will be detected before we return it. Therefore, assign an initial value to quiet the warning.
Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/f35c02d9 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/f35c02d9 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/f35c02d9 Branch: refs/heads/master Commit: f35c02d96610e8f1fef0ed396650a1b498a1d138 Parents: b71d2db Author: Marvin Humphrey <[email protected]> Authored: Wed Mar 16 00:23:47 2016 +0000 Committer: Marvin Humphrey <[email protected]> Committed: Sat Mar 19 21:42:36 2016 -0700 ---------------------------------------------------------------------- compiler/src/CFCPyMethod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/f35c02d9/compiler/src/CFCPyMethod.c ---------------------------------------------------------------------- diff --git a/compiler/src/CFCPyMethod.c b/compiler/src/CFCPyMethod.c index 3d13665..45b0f86 100644 --- a/compiler/src/CFCPyMethod.c +++ b/compiler/src/CFCPyMethod.c @@ -515,7 +515,7 @@ S_gen_meth_invocation(CFCMethod *method, CFCClass *invoker) { maybe_assign = ""; } else { - maybe_declare = CFCUtil_sprintf(" %s retvalCF;\n", + maybe_declare = CFCUtil_sprintf(" %s retvalCF = 0;\n", CFCType_to_c(return_type)); maybe_assign = "retvalCF = "; }
