From e56c722b60c67fe915c22970a5e669a723fa1ce9 Mon Sep 17 00:00:00 2001 From: "Maciej W. Rozycki" Date: Fri, 22 Aug 2014 16:30:36 +0100 Subject: [PATCH] ARM/gas: Fix a build failure with GCC 4.3.3 cc1: warnings being treated as errors .../gas/config/tc-arm.c: In function 'add_to_lit_pool': .../gas/config/tc-arm.c:3193: error: 'imm1' may be used uninitialized in this function * config/tc-arm.c (add_to_lit_pool): Preinitialize `imm1'. --- gas/ChangeLog | 4 ++++ gas/config/tc-arm.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 6a0865ca416..6c4e6b8e1dd 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2014-08-22 Maciej W. Rozycki + + * config/tc-arm.c (add_to_lit_pool): Preinitialize `imm1'. + 2014-08-20 Maciej W. Rozycki * dw2gencfi.c (make_debug_seg): Replace leading spaces with tabs. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index ae908b17616..560b4cff5d3 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -3192,7 +3192,7 @@ add_to_lit_pool (unsigned int nbytes) literal_pool * pool; unsigned int entry, pool_size = 0; bfd_boolean padding_slot_p = FALSE; - unsigned imm1; + unsigned imm1 = 0; unsigned imm2 = 0; if (nbytes == 8) -- 2.30.2