[COMMITTED PATCH] fix _dl_close_worker warning

Roland McGrath roland@hack.frob.com
Fri Aug 17 16:55:00 GMT 2012


I also added a comment while I was there, which it seems to me should have
been there to begin with.

Gary, when we vet changes by eye we are assuming that the submitter has
tested them and this includes verifying that they do not introduce new
compiler warnings (except the occasional 'might be used uninitialized' when
it's unavoidable without adding dead stores).  Please make sure you do not
introduce any warnings in any future changes.


Thanks,
Roland


	* elf/dl-close.c (_dl_close_worker): Add a cast and a comment to the
	last change.

diff --git a/elf/dl-close.c b/elf/dl-close.c
index 216bd81..e6ff7e7 100644
--- a/elf/dl-close.c
+++ b/elf/dl-close.c
@@ -641,7 +641,11 @@ _dl_close_worker (struct link_map *map)
 #ifdef SHARED
 	      assert (nsid != LM_ID_BASE);
 #endif
-	      r->r_map = ns->_ns_loaded = imap->l_next;
+	      ns->_ns_loaded = imap->l_next;
+
+	      /* Update the pointer to the head of the list
+		 we leave for debuggers to examine.  */
+	      r->r_map = (void *) ns->_ns_loaded;
 	    }
 
 	  --ns->_ns_nloaded;



More information about the Libc-alpha mailing list