summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2016-04-06 20:25:03 -0400
committermidipix <writeonce@midipix.org>2016-04-06 20:42:31 -0400
commit14691615ea47dd30f03db73505f3f493c202e512 (patch)
treee143fffbb85523df18f411adc44a8a95d68fe57e
parent94d109fa418c024c214a50d645624e2e2935e6d1 (diff)
downloadslibtool-14691615ea47dd30f03db73505f3f493c202e512.tar.bz2
slibtool-14691615ea47dd30f03db73505f3f493c202e512.tar.xz
driver: slbt_init_link_params(): explicitly initialize the 'prefix' variable.
This addresses a compiler false positive identification of a missing variable initialization. Note that access to 'prefix' is preceded by the following check: if (!libname) return 0; and that all code paths which include an initialization of 'libname' also entail the initialization of 'prefix'.
-rw-r--r--src/driver/slbt_driver_ctx.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/driver/slbt_driver_ctx.c b/src/driver/slbt_driver_ctx.c
index 73c0e15..c6a11f9 100644
--- a/src/driver/slbt_driver_ctx.c
+++ b/src/driver/slbt_driver_ctx.c
@@ -456,6 +456,7 @@ static int slbt_init_link_params(struct slbt_driver_ctx_impl * ctx)
program = argv_program_name(ctx->cctx.targv[0]);
libname = 0;
+ prefix = 0;
/* output */
if (!(ctx->cctx.output)) {