34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
|
commit 5615eaf26469f20c2d8c3be5770e12564a1edfff
|
||
|
Author: Roland McGrath <roland@hack.frob.com>
|
||
|
Date: Fri Jun 10 12:45:09 2011 -0700
|
||
|
|
||
|
Quash some new warnings from GCC 4.6.
|
||
|
|
||
|
2011-06-10 Roland McGrath <roland@hack.frob.com>
|
||
|
|
||
|
* elf/dl-open.c (_dl_open): Quash warnings when DL_NNS==1.
|
||
|
|
||
|
diff --git a/elf/dl-open.c b/elf/dl-open.c
|
||
|
index 8d90b56..19fda91 100644
|
||
|
--- a/elf/dl-open.c
|
||
|
+++ b/elf/dl-open.c
|
||
|
@@ -516,7 +516,7 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
|
||
|
if (__builtin_expect (nsid == LM_ID_NEWLM, 0))
|
||
|
{
|
||
|
/* Find a new namespace. */
|
||
|
- for (nsid = 1; nsid < GL(dl_nns); ++nsid)
|
||
|
+ for (nsid = 1; DL_NNS > 1 && nsid < GL(dl_nns); ++nsid)
|
||
|
if (GL(dl_ns)[nsid]._ns_loaded == NULL)
|
||
|
break;
|
||
|
|
||
|
@@ -528,8 +528,7 @@ _dl_open (const char *file, int mode, const void *caller_dlopen, Lmid_t nsid,
|
||
|
_dl_signal_error (EINVAL, file, NULL, N_("\
|
||
|
no more namespaces available for dlmopen()"));
|
||
|
}
|
||
|
-
|
||
|
- if (nsid == GL(dl_nns))
|
||
|
+ else if (nsid == GL(dl_nns))
|
||
|
{
|
||
|
__rtld_lock_initialize (GL(dl_ns)[nsid]._ns_unique_sym_table.lock);
|
||
|
++GL(dl_nns);
|