public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] nptl: Add missing err declaration __pthread_initialize_minimal_internal
@ 2015-05-22 10:58 Khem Raj
  2015-05-22 14:28 ` Florian Weimer
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2015-05-22 10:58 UTC (permalink / raw)
  To: libc-alpha; +Cc: Khem Raj

Fixes build problems on mips
nptl-init.c: In function '__pthread_initialize_minimal_internal':
nptl-init.c:333:48: error: 'err' undeclared (first use in this function)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 ChangeLog        | 5 +++++
 nptl/nptl-init.c | 1 +
 2 files changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index ba7a400..ae5c8d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-15-21  Khem Raj  <raj.khem@gmail.com>
+
+	* nptl/nptl-init.c (__pthread_initialize_minimal_internal): Add
+	INTERNAL_SYSCALL_DECL (err).
+
 2015-05-21  Joseph Myers  <joseph@codesourcery.com>
 
 	* sysdeps/ieee754/dbl-64/e_lgamma_r.c: Include <libc-internal.h>.
diff --git a/nptl/nptl-init.c b/nptl/nptl-init.c
index 5b8d931..f885c5d 100644
--- a/nptl/nptl-init.c
+++ b/nptl/nptl-init.c
@@ -309,6 +309,7 @@ __pthread_initialize_minimal_internal (void)
      used.  */
   __asm __volatile ("");
 #endif
+  INTERNAL_SYSCALL_DECL (err);
 
   /* Minimal initialization of the thread descriptor.  */
   struct pthread *pd = THREAD_SELF;
-- 
2.1.4

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nptl: Add missing err declaration __pthread_initialize_minimal_internal
  2015-05-22 10:58 [PATCH] nptl: Add missing err declaration __pthread_initialize_minimal_internal Khem Raj
@ 2015-05-22 14:28 ` Florian Weimer
  2015-05-24 13:31   ` Carlos O'Donell
  0 siblings, 1 reply; 4+ messages in thread
From: Florian Weimer @ 2015-05-22 14:28 UTC (permalink / raw)
  To: raj.khem; +Cc: libc-alpha

On 05/22/2015 08:23 AM, Khem Raj wrote:
> Fixes build problems on mips
> nptl-init.c: In function '__pthread_initialize_minimal_internal':
> nptl-init.c:333:48: error: 'err' undeclared (first use in this function)

I think you should move the err definition closer to its users,
introducing a new scope if necessary.  The use sites are conditional on
preprocessor symbols, and a function-global definition might result in
unused variable warnings on other architectures (which are treated as
errors).

-- 
Florian Weimer / Red Hat Product Security

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nptl: Add missing err declaration __pthread_initialize_minimal_internal
  2015-05-22 14:28 ` Florian Weimer
@ 2015-05-24 13:31   ` Carlos O'Donell
  2015-05-24 14:03     ` Carlos O'Donell
  0 siblings, 1 reply; 4+ messages in thread
From: Carlos O'Donell @ 2015-05-24 13:31 UTC (permalink / raw)
  To: Florian Weimer, raj.khem; +Cc: libc-alpha

On 05/22/2015 06:02 AM, Florian Weimer wrote:
> On 05/22/2015 08:23 AM, Khem Raj wrote:
>> Fixes build problems on mips
>> nptl-init.c: In function '__pthread_initialize_minimal_internal':
>> nptl-init.c:333:48: error: 'err' undeclared (first use in this function)
> 
> I think you should move the err definition closer to its users,
> introducing a new scope if necessary.  The use sites are conditional on
> preprocessor symbols, and a function-global definition might result in
> unused variable warnings on other architectures (which are treated as
> errors).
> 

Agreed. The err declaration should be right beside the syscall and in
a new scope.

Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] nptl: Add missing err declaration __pthread_initialize_minimal_internal
  2015-05-24 13:31   ` Carlos O'Donell
@ 2015-05-24 14:03     ` Carlos O'Donell
  0 siblings, 0 replies; 4+ messages in thread
From: Carlos O'Donell @ 2015-05-24 14:03 UTC (permalink / raw)
  To: Florian Weimer, raj.khem; +Cc: libc-alpha

On 05/23/2015 10:25 PM, Carlos O'Donell wrote:
> On 05/22/2015 06:02 AM, Florian Weimer wrote:
>> On 05/22/2015 08:23 AM, Khem Raj wrote:
>>> Fixes build problems on mips
>>> nptl-init.c: In function '__pthread_initialize_minimal_internal':
>>> nptl-init.c:333:48: error: 'err' undeclared (first use in this function)
>>
>> I think you should move the err definition closer to its users,
>> introducing a new scope if necessary.  The use sites are conditional on
>> preprocessor symbols, and a function-global definition might result in
>> unused variable warnings on other architectures (which are treated as
>> errors).
>>
> 
> Agreed. The err declaration should be right beside the syscall and in
> a new scope.

I see you're fixing the same thing Steve is fixing.

See his patch.

Cheers,
Carlos.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-05-24  3:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-22 10:58 [PATCH] nptl: Add missing err declaration __pthread_initialize_minimal_internal Khem Raj
2015-05-22 14:28 ` Florian Weimer
2015-05-24 13:31   ` Carlos O'Donell
2015-05-24 14:03     ` Carlos O'Donell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).