This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] nptl: Add missing err declaration __pthread_initialize_minimal_internal
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Florian Weimer <fweimer at redhat dot com>, raj dot khem at gmail dot com
- Cc: libc-alpha at sourceware dot org
- Date: Sat, 23 May 2015 22:25:31 -0400
- Subject: Re: [PATCH] nptl: Add missing err declaration __pthread_initialize_minimal_internal
- Authentication-results: sourceware.org; auth=none
- References: <1432275814-4901-1-git-send-email-raj dot khem at gmail dot com> <555EFE9A dot 7090502 at redhat dot com>
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.