[PATCH 1/25] Remove nested functions: crypt/md5-crypt.c

Konstantin Serebryany konstantin.s.serebryany@gmail.com
Tue Jun 3 08:29:00 GMT 2014


On Mon, Jun 2, 2014 at 10:08 PM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> On Mon, Jun 02, 2014 at 08:50:51AM +0400, Konstantin Serebryany wrote:
>> Any comment on this patch?
>
> It results in a bunch of build warnings with gcc.  Please fix those.
Indeed so, needed one extra include. Fixed, please check the new patch.

Did you just see the warnings with your eyes, or do you use a special
configure switch or some such to turn them into errors?

I've run full build with and w/o my patch. The diff of sorted warnings
looks like this:

--- w0  2014-06-03 12:22:39.299947245 +0400
+++ w1  2014-06-03 12:22:41.755918580 +0400
@@ -29,6 +29,7 @@
 dynamic-link.h:179:8: warning: "ELF_MACHINE_NO_RELA" is not defined [-Wundef]
 dynamic-link.h:179:8: warning: "ELF_MACHINE_NO_RELA" is not defined [-Wundef]
 dynamic-link.h:179:8: warning: "ELF_MACHINE_NO_RELA" is not defined [-Wundef]
+dynamic-link.h:179:8: warning: "ELF_MACHINE_NO_RELA" is not defined [-Wundef]
 dynamic-link.h:66:8: warning: "ELF_MACHINE_NO_RELA" is not defined [-Wundef]
 dynamic-link.h:66:8: warning: "ELF_MACHINE_NO_RELA" is not defined [-Wundef]
 dynamic-link.h:66:8: warning: "ELF_MACHINE_NO_RELA" is not defined [-Wundef]
@@ -458,6 +459,12 @@
 ../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]
 ../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]
 ../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]
+../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]
+../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]
+../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]
+../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]
+../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]
+../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]
 ../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]
 ../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]
 ../malloc/obstack.h:255:23: warning: "__NeXT__" is not defined [-Wundef]

So, there are no new kinds of warnings added with the current patch.

--kcc

>
> Siddhesh
>
>>
>> On Thu, May 22, 2014 at 7:14 PM, Konstantin Serebryany
>> <konstantin.s.serebryany@gmail.com> wrote:
>> > On Thu, May 22, 2014 at 6:59 PM, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
>> >> On Tue, May 20, 2014 at 06:23:40PM +0400, Konstantin Serebryany wrote:
>> >>> 2014-05-20  Kostya Serebryany  <konstantin.s.serebryany@gmail.com>
>> >>>
>> >>>         * crypt/md5-crypt.c (__md5_crypt_r): Remove a nested function.
>> >>>         (b64_from_24bit): New function.
>> >>>
>> >>
>> >> I have pushed this (and the formatting fix) now.
>> >
>> > Excellent, thanks!
>> > Here is the next patch with (hopefully) correct tabs:
>> >
>> > 2014-05-22  Kostya Serebryany  <konstantin.s.serebryany@gmail.com>
>> >
>> >         * crypt/crypt-private.h: Include ufc-crypt.h.
>> >         (__b64_from_24bit): Declare extern.
>> >         * crypt/crypt_util.c(__b64_from_24bit): New function.
>> >         (b64t): New static const variable.
>> >         * crypt/md5-crypt.c (b64_from_24bit): Remove function.
>> >         (b64t): Remove variable.
>> >         (__md5_crypt_r): Replace b64_from_24bit with __b64_from_24bit.
>> >         * crypt/sha256-crypt.c: Include crypt-private.h.
>> >         (b64t): Remove variable.
>> >         (__sha256_crypt_r): Remove b64_from_24bit and replace
>> >         with __b64_from_24bit.
>> >         * crypt/sha512-crypt.c: Likewise.
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >>
>> >> Siddhesh
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nested.patch
Type: text/x-patch
Size: 11280 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20140603/dfe9016a/attachment.bin>


More information about the Libc-alpha mailing list