Prevent -Wmaybe-uninitialized warning in cmse_scan

2016-06-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	bfd/
	* bfd/elf32-arm.c (cmse_scan): Declare and initialize j in the
	innermost conditional block containing all its uses.
diff --git a/bfd/ChangeLog.arm b/bfd/ChangeLog.arm
index 0e61356..d1af3b5 100644
--- a/bfd/ChangeLog.arm
+++ b/bfd/ChangeLog.arm
@@ -1,3 +1,8 @@
+2016-06-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
+
+	* bfd/elf32-arm.c (cmse_scan): Declare and initialize j in the
+	innermost conditional block containing all its uses.
+
 2016-06-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
 
 	* elf32-arm.c (elf32_arm_gc_mark_extra_sections): Mark sections holding
diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c
index 588f832..36d2a33 100644
--- a/bfd/elf32-arm.c
+++ b/bfd/elf32-arm.c
@@ -5531,10 +5531,14 @@
 	      && hash->root.root.type != bfd_link_hash_defweak)
 	  || hash->root.type != STT_FUNC)
 	{
+	  /* Initialize here to avoid warning about use of possibly
+	     uninitialized variable.  */
+	  j = 0;
+
 	  if (!hash)
 	    {
 	      /* Searching for a normal symbol with local binding.  */
-	      for (j = 0; j < ext_start; j++)
+	      for (; j < ext_start; j++)
 		{
 		  lsym_name =
 		    bfd_elf_string_from_elf_section (input_bfd,