This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Warnings in <bits/string.h>


>Submitter-Id:	net
>Originator:	Joseph S. Myers
>Organization:
Trinity College, University of Cambridge, UK
>Confidential:	no
>Synopsis:	Warnings in <bits/string.h>
>Severity:	non-critical
>Priority:	low
>Category:	libc
>Class:		sw-bug
>Release:	libc-2.0.104
>Environment:
	
Host type: i686-pc-linux-gnu
System: Linux decomino 2.0.36 #1 Mon Nov 16 14:25:34 UTC 1998 i686 unknown
Architecture: i686

Addons: crypt linuxthreads
Build CFLAGS: -g -O6 -funroll-loops -march=pentiumpro
Build CC: gcc
Compiler version: egcs-2.91.57 19980901 (egcs-1.1 release)
Kernel headers: 2.1.130
Symbol versioning: yes
Build static: yes
Build shared: yes
Build pic-default: no
Build profile: yes
Build omitfp: no
Build bounded: no
Build static-nss: no
Stdio: libio

>Description:

<bits/string.h> still has many `no previous prototype' warnings for
its inline functions.

>How-To-Repeat:

#define __USE_STRING_INLINES
#define _GNU_SOURCE
#include <string.h>

Compile with gcc -c -O -Wmissing-prototypes; this gives the following
warnings:

/usr/include/bits/string.h:64: warning: no previous prototype for `__memcpy_by4'
/usr/include/bits/string.h:83: warning: no previous prototype for `__memcpy_by2'
/usr/include/bits/string.h:107: warning: no previous prototype for `__memcpy_g'
/usr/include/bits/string.h:208: warning: no previous prototype for `__memset_cc_by4'
/usr/include/bits/string.h:225: warning: no previous prototype for `__memset_cc_by2'
/usr/include/bits/string.h:246: warning: no previous prototype for `__memset_gc_by4'
/usr/include/bits/string.h:267: warning: no previous prototype for `__memset_gc_by2'
/usr/include/bits/string.h:292: warning: no previous prototype for `__memset_cg'
/usr/include/bits/string.h:309: warning: no previous prototype for `__memset_gg'
/usr/include/bits/string.h:367: warning: no previous prototype for `__strlen_g'
/usr/include/bits/string.h:443: warning: no previous prototype for `__strcpy_g'
/usr/include/bits/string.h:535: warning: no previous prototype for `__mempcpy_by4'
/usr/include/bits/string.h:554: warning: no previous prototype for `__mempcpy_by2'
/usr/include/bits/string.h:578: warning: no previous prototype for `__mempcpy_byn'
/usr/include/bits/string.h:600: warning: no previous prototype for `__stpcpy_g'
/usr/include/bits/string.h:638: warning: no previous prototype for `__strncpy_by4'
/usr/include/bits/string.h:658: warning: no previous prototype for `__strncpy_by2'
/usr/include/bits/string.h:683: warning: no previous prototype for `__strncpy_byn'
/usr/include/bits/string.h:706: warning: no previous prototype for `__strncpy_gg'
/usr/include/bits/string.h:743: warning: no previous prototype for `__strcat_c'
/usr/include/bits/string.h:770: warning: no previous prototype for `__strcat_g'
/usr/include/bits/string.h:805: warning: no previous prototype for `__strncat_g'
/usr/include/bits/string.h:923: warning: no previous prototype for `__strcmp_gg'
/usr/include/bits/string.h:959: warning: no previous prototype for `__strncmp_g'
/usr/include/bits/string.h:996: warning: no previous prototype for `__strchr_c'
/usr/include/bits/string.h:1017: warning: no previous prototype for `__strchr_g'
/usr/include/bits/string.h:1058: warning: no previous prototype for `__strrchr_c'
/usr/include/bits/string.h:1077: warning: no previous prototype for `__strrchr_g'
/usr/include/bits/string.h:1164: warning: no previous prototype for `__strcspn_c1'
/usr/include/bits/string.h:1184: warning: no previous prototype for `__strcspn_cg'
/usr/include/bits/string.h:1235: warning: no previous prototype for `__strcspn_g'
/usr/include/bits/string.h:1274: warning: no previous prototype for `__strspn_c1'
/usr/include/bits/string.h:1292: warning: no previous prototype for `__strspn_cg'
/usr/include/bits/string.h:1342: warning: no previous prototype for `__strspn_g'
/usr/include/bits/string.h:1380: warning: no previous prototype for `__strpbrk_cg'
/usr/include/bits/string.h:1439: warning: no previous prototype for `__strpbrk_g'
/usr/include/bits/string.h:1485: warning: no previous prototype for `__strstr_cg'
/usr/include/bits/string.h:1541: warning: no previous prototype for `__strstr_g'

>Fix:

Add prototypes for the above functions before their inline
definitions, as was previously done with <bits/string2.h>.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]