[Debian-zh-dev] Bug#1066279: unicon: FTBFS: cin2tab.c:238:13: error: implicit declaration of function ‘tolower’ [-Werror=implicit-function-declaration]

Lucas Nussbaum lucas at debian.org
Wed Mar 13 11:46:06 GMT 2024


Source: unicon
Version: 3.0.4+dfsg1-4
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.

This is most likely caused by a change in dpkg 1.22.6, that enabled
-Werror=implicit-function-declaration. For more information, see
https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration

Relevant part (hopefully):
> gcc -fPIC -g -Wall -I../../include -I. -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wdate-time -D_FORTIFY_SOURCE=2 -c -g -I../../include -I. cin2tab.c -o cin2tab.o
> cin2tab.c: In function ‘get_line’:
> cin2tab.c:80:16: warning: pointer targets in passing argument 1 of ‘fgets’ differ in signedness [-Wpointer-sign]
>    80 |         fgets (tt, 128, fr);
>       |                ^~
>       |                |
>       |                u_char * {aka unsigned char *}
> In file included from /usr/include/stdio.h:906,
>                  from cin2tab.c:27:
> /usr/include/x86_64-linux-gnu/bits/stdio2.h:209:25: note: expected ‘char * restrict’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>   209 | fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
>       |        ~~~~~~~~~~~~~~~~~^~~
> cin2tab.c: In function ‘cmd_arg’:
> cin2tab.c:96:18: warning: pointer targets in passing argument 1 of ‘skip_space’ differ in signedness [-Wpointer-sign]
>    96 |     s=skip_space(s);
>       |                  ^
>       |                  |
>       |                  u_char * {aka unsigned char *}
> cin2tab.c:50:24: note: expected ‘char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>    50 | char *skip_space(char *s)
>       |                  ~~~~~~^
> cin2tab.c:96:6: warning: pointer targets in assignment from ‘char *’ to ‘u_char *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
>    96 |     s=skip_space(s);
>       |      ^
> cin2tab.c:97:16: warning: pointer targets in passing argument 1 of ‘to_space’ differ in signedness [-Wpointer-sign]
>    97 |     t=to_space(s);
>       |                ^
>       |                |
>       |                u_char * {aka unsigned char *}
> cin2tab.c:56:22: note: expected ‘char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>    56 | char *to_space(char *s)
>       |                ~~~~~~^
> cin2tab.c:100:13: warning: pointer targets in assignment from ‘char *’ to ‘u_char *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
>   100 |         *arg=t;
>       |             ^
> cin2tab.c:107:9: warning: pointer targets in assignment from ‘char *’ to ‘u_char *’ {aka ‘unsigned char *’} differ in signedness [-Wpointer-sign]
>   107 |     *arg=t;
>       |         ^
> cin2tab.c: In function ‘main’:
> cin2tab.c:194:13: warning: pointer targets in passing argument 1 of ‘cmd_arg’ differ in signedness [-Wpointer-sign]
>   194 |     cmd_arg(tt, &cmd, &arg);
>       |             ^~
>       |             |
>       |             char *
> cin2tab.c:89:22: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
>    89 | void cmd_arg(u_char *s, u_char **cmd, u_char **arg)
>       |              ~~~~~~~~^
> cin2tab.c:195:16: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness [-Wpointer-sign]
>   195 |     if (strcmp(cmd,"%ename") || !(*arg) )
>       |                ^~~
>       |                |
>       |                u_char * {aka unsigned char *}
> In file included from cin2tab.c:30:
> /usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>   156 | extern int strcmp (const char *__s1, const char *__s2)
>       |                    ~~~~~~~~~~~~^~~~
> cin2tab.c:198:27: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness [-Wpointer-sign]
>   198 |     strcpy(InpTable.ename,arg);
>       |                           ^~~
>       |                           |
>       |                           u_char * {aka unsigned char *}
> In file included from /usr/include/features.h:490,
>                  from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
>                  from /usr/include/stdio.h:27:
> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:77:1: note: expected ‘const char * restrict’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>    77 | __NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
>       | ^~~~~
> cin2tab.c:200:13: warning: pointer targets in passing argument 1 of ‘cmd_arg’ differ in signedness [-Wpointer-sign]
>   200 |     cmd_arg(tt, &cmd, &arg);
>       |             ^~
>       |             |
>       |             char *
> cin2tab.c:89:22: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
>    89 | void cmd_arg(u_char *s, u_char **cmd, u_char **arg)
>       |              ~~~~~~~~^
> cin2tab.c:201:16: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness [-Wpointer-sign]
>   201 |     if (strcmp(cmd,"%prompt") || !(*arg) )
>       |                ^~~
>       |                |
>       |                u_char * {aka unsigned char *}
> /usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>   156 | extern int strcmp (const char *__s1, const char *__s2)
>       |                    ~~~~~~~~~~~~^~~~
> cin2tab.c:204:28: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness [-Wpointer-sign]
>   204 |     strcpy(InpTable.cname, arg);
>       |                            ^~~
>       |                            |
>       |                            u_char * {aka unsigned char *}
> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:77:1: note: expected ‘const char * restrict’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>    77 | __NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
>       | ^~~~~
> cin2tab.c:206:13: warning: pointer targets in passing argument 1 of ‘cmd_arg’ differ in signedness [-Wpointer-sign]
>   206 |     cmd_arg(tt,&cmd, &arg);
>       |             ^~
>       |             |
>       |             char *
> cin2tab.c:89:22: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
>    89 | void cmd_arg(u_char *s, u_char **cmd, u_char **arg)
>       |              ~~~~~~~~^
> cin2tab.c:207:16: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness [-Wpointer-sign]
>   207 |     if (strcmp(cmd,"%selkey") || !(*arg) )
>       |                ^~~
>       |                |
>       |                u_char * {aka unsigned char *}
> /usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>   156 | extern int strcmp (const char *__s1, const char *__s2)
>       |                    ~~~~~~~~~~~~^~~~
> cin2tab.c:209:28: warning: pointer targets in passing argument 2 of ‘strcpy’ differ in signedness [-Wpointer-sign]
>   209 |     strcpy(InpTable.selkey,arg);
>       |                            ^~~
>       |                            |
>       |                            u_char * {aka unsigned char *}
> /usr/include/x86_64-linux-gnu/bits/string_fortified.h:77:1: note: expected ‘const char * restrict’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>    77 | __NTH (strcpy (char *__restrict __dest, const char *__restrict __src))
>       | ^~~~~
> cin2tab.c:211:13: warning: pointer targets in passing argument 1 of ‘cmd_arg’ differ in signedness [-Wpointer-sign]
>   211 |     cmd_arg(tt,&cmd, &arg);
>       |             ^~
>       |             |
>       |             char *
> cin2tab.c:89:22: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
>    89 | void cmd_arg(u_char *s, u_char **cmd, u_char **arg)
>       |              ~~~~~~~~^
> cin2tab.c:212:16: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness [-Wpointer-sign]
>   212 |     if (strcmp(cmd,"%last_full") || !(*arg))
>       |                ^~~
>       |                |
>       |                u_char * {aka unsigned char *}
> /usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>   156 | extern int strcmp (const char *__s1, const char *__s2)
>       |                    ~~~~~~~~~~~~^~~~
> cin2tab.c:220:17: warning: pointer targets in passing argument 1 of ‘cmd_arg’ differ in signedness [-Wpointer-sign]
>   220 |         cmd_arg(tt, &cmd, &arg);
>       |                 ^~
>       |                 |
>       |                 char *
> cin2tab.c:89:22: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
>    89 | void cmd_arg(u_char *s, u_char **cmd, u_char **arg)
>       |              ~~~~~~~~^
> cin2tab.c:223:16: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness [-Wpointer-sign]
>   223 |     if (strcmp(cmd,"%dupsel") || !(*arg) )
>       |                ^~~
>       |                |
>       |                u_char * {aka unsigned char *}
> /usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>   156 | extern int strcmp (const char *__s1, const char *__s2)
>       |                    ~~~~~~~~~~~~^~~~
> cin2tab.c:225:29: warning: pointer targets in passing argument 1 of ‘atoi’ differ in signedness [-Wpointer-sign]
>   225 |     InpTable.MaxDupSel=atoi(arg);
>       |                             ^~~
>       |                             |
>       |                             u_char * {aka unsigned char *}
> /usr/include/stdlib.h:362:1: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>   362 | __NTH (atoi (const char *__nptr))
>       | ^~~~~
> cin2tab.c:229:13: warning: pointer targets in passing argument 1 of ‘cmd_arg’ differ in signedness [-Wpointer-sign]
>   229 |     cmd_arg(tt,&cmd, &arg);
>       |             ^~
>       |             |
>       |             char *
> cin2tab.c:89:22: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
>    89 | void cmd_arg(u_char *s, u_char **cmd, u_char **arg)
>       |              ~~~~~~~~^
> cin2tab.c:230:16: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness [-Wpointer-sign]
>   230 |     if (strcmp(cmd,"%keyname") || strcmp(arg,"begin"))
>       |                ^~~
>       |                |
>       |                u_char * {aka unsigned char *}
> /usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>   156 | extern int strcmp (const char *__s1, const char *__s2)
>       |                    ~~~~~~~~~~~~^~~~
> cin2tab.c:230:42: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness [-Wpointer-sign]
>   230 |     if (strcmp(cmd,"%keyname") || strcmp(arg,"begin"))
>       |                                          ^~~
>       |                                          |
>       |                                          u_char * {aka unsigned char *}
> /usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>   156 | extern int strcmp (const char *__s1, const char *__s2)
>       |                    ~~~~~~~~~~~~^~~~
> cin2tab.c:236:17: warning: pointer targets in passing argument 1 of ‘cmd_arg’ differ in signedness [-Wpointer-sign]
>   236 |         cmd_arg(tt,&cmd, &arg);
>       |                 ^~
>       |                 |
>       |                 char *
> cin2tab.c:89:22: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
>    89 | void cmd_arg(u_char *s, u_char **cmd, u_char **arg)
>       |              ~~~~~~~~^
> cin2tab.c:237:21: warning: pointer targets in passing argument 1 of ‘strcmp’ differ in signedness [-Wpointer-sign]
>   237 |         if (!strcmp(cmd,"%keyname")) break;
>       |                     ^~~
>       |                     |
>       |                     u_char * {aka unsigned char *}
> /usr/include/string.h:156:32: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>   156 | extern int strcmp (const char *__s1, const char *__s2)
>       |                    ~~~~~~~~~~~~^~~~
> cin2tab.c:238:13: error: implicit declaration of function ‘tolower’ [-Werror=implicit-function-declaration]
>   238 |         k = tolower(cmd[0]);  /* k = char */
>       |             ^~~~~~~
> cin2tab.c:35:1: note: include ‘<ctype.h>’ or provide a declaration of ‘tolower’
>    34 | #include "xl_phrase.h"
>   +++ |+#include <ctype.h>
>    35 | 
> cin2tab.c:263:17: warning: pointer targets in passing argument 1 of ‘cmd_arg’ differ in signedness [-Wpointer-sign]
>   263 |         cmd_arg(tt,&cmd,&arg);
>       |                 ^~
>       |                 |
>       |                 char *
> cin2tab.c:89:22: note: expected ‘u_char *’ {aka ‘unsigned char *’} but argument is of type ‘char *’
>    89 | void cmd_arg(u_char *s, u_char **cmd, u_char **arg)
>       |              ~~~~~~~~^
> cin2tab.c:266:22: warning: pointer targets in passing argument 1 of ‘strlen’ differ in signedness [-Wpointer-sign]
>   266 |         len = strlen(cmd);
>       |                      ^~~
>       |                      |
>       |                      u_char * {aka unsigned char *}
> /usr/include/string.h:407:35: note: expected ‘const char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>   407 | extern size_t strlen (const char *__s)
>       |                       ~~~~~~~~~~~~^~~
> cin2tab.c:289:48: warning: pointer targets in passing argument 2 of ‘TL_MatchPhrase’ differ in signedness [-Wpointer-sign]
>   289 |         if (TL_MatchPhrase (pDefaultSysphrase, arg, &freq, &nPhrase) == 0)
>       |                                                ^~~
>       |                                                |
>       |                                                u_char * {aka unsigned char *}
> In file included from xl_hzinput.h:31,
>                  from cin2tab.c:32:
> ./xl_sysphrase.h:60:47: note: expected ‘char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>    60 | int  TL_MatchPhrase (TL_SysPhrase_T *p, char *szPhraseg,
>       |                                         ~~~~~~^~~~~~~~~
> cin2tab.c:291:59: warning: pointer targets in passing argument 2 of ‘TL_AppendPhrase’ differ in signedness [-Wpointer-sign]
>   291 |             nPhrase = TL_AppendPhrase (pDefaultSysphrase, arg);
>       |                                                           ^~~
>       |                                                           |
>       |                                                           u_char * {aka unsigned char *}
> ./xl_sysphrase.h:67:48: note: expected ‘char *’ but argument is of type ‘u_char *’ {aka ‘unsigned char *’}
>    67 | long TL_AppendPhrase (TL_SysPhrase_T *p, char *buf);
>       |                                          ~~~~~~^~~
> cin2tab.c:131:25: warning: unused variable ‘phrasebuf_pointer’ [-Wunused-variable]
>   131 |     int phrase_count=0, phrasebuf_pointer=0;
>       |                         ^~~~~~~~~~~~~~~~~
> cin2tab.c:131:9: warning: unused variable ‘phrase_count’ [-Wunused-variable]
>   131 |     int phrase_count=0, phrasebuf_pointer=0;
>       |         ^~~~~~~~~~~~
> cin2tab.c:129:15: warning: unused variable ‘ItemCount’ [-Wunused-variable]
>   129 |     int index,ItemCount;
>       |               ^~~~~~~~~
> cin2tab.c:128:10: warning: unused variable ‘LastItem’ [-Wunused-variable]
>   128 |     ITEM LastItem;
>       |          ^~~~~~~~
> cin2tab.c:122:24: warning: unused variable ‘fname_lx’ [-Wunused-variable]
>   122 |     char fname_phr[64],fname_lx[64];
>       |                        ^~~~~~~~
> cin2tab.c:122:10: warning: unused variable ‘fname_phr’ [-Wunused-variable]
>   122 |     char fname_phr[64],fname_lx[64];
>       |          ^~~~~~~~~
> cin2tab.c: In function ‘get_line’:
> cin2tab.c:80:9: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
>    80 |         fgets (tt, 128, fr);
>       |         ^~~~~~~~~~~~~~~~~~~
> cin2tab.c: In function ‘main’:
> cin2tab.c:179:28: warning: ‘.cin’ directive writing 4 bytes into a region of size between 1 and 64 [-Wformat-overflow=]
>   179 |     sprintf (fname_cin, "%s.cin", fname);
>       |                            ^~~~
> In function ‘sprintf’,
>     inlined from ‘main’ at cin2tab.c:179:5:
> /usr/include/x86_64-linux-gnu/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 5 and 68 bytes into a destination of size 64
>    30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    31 |                                   __glibc_objsize (__s), __fmt,
>       |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    32 |                                   __va_arg_pack ());
>       |                                   ~~~~~~~~~~~~~~~~~
> cin2tab.c: In function ‘main’:
> cin2tab.c:180:28: warning: ‘.tab’ directive writing 4 bytes into a region of size between 1 and 64 [-Wformat-overflow=]
>   180 |     sprintf (fname_tab, "%s.tab", fname);
>       |                            ^~~~
> In function ‘sprintf’,
>     inlined from ‘main’ at cin2tab.c:180:5:
> /usr/include/x86_64-linux-gnu/bits/stdio2.h:30:10: note: ‘__builtin___sprintf_chk’ output between 5 and 68 bytes into a destination of size 64
>    30 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
>       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    31 |                                   __glibc_objsize (__s), __fmt,
>       |                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>    32 |                                   __va_arg_pack ());
>       |                                   ~~~~~~~~~~~~~~~~~
> cc1: some warnings being treated as errors
> make[4]: *** [Makefile:55: cin2tab] Error 1


The full build log is available from:
http://qa-logs.debian.net/2024/03/13/unicon_3.0.4+dfsg1-4_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please mark it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.



More information about the Chinese-developers mailing list