Closed ddeclerck closed 2 months ago
Attention: Patch coverage is 79.64602%
with 46 lines
in your changes are missing coverage. Please review.
Please upload report for BASE (
gc4@51f599d
). Learn more about missing BASE report.
Files | Patch % | Lines |
---|---|---|
cobc/codegen.c | 76.11% | 25 Missing and 7 partials :warning: |
libcob/fileio.c | 76.66% | 3 Missing and 4 partials :warning: |
cobc/cobc.c | 73.33% | 2 Missing and 2 partials :warning: |
cobc/scanner.l | 50.00% | 0 Missing and 3 partials :warning: |
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The current bunch is fine, if that does pass make checkall
on a "common Linux system" then please check them in, recycling this draft PR for the next bunch.
Fails on MinGW (:
make[3]: Entering directory `/c/projects/gnucobol/cobc'
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -MT cobc.o -MD -MP -MF .deps/cobc.Tpo -c -o cobc.o cobc.c
In file included from cobc.h:36:0,
from cobc.c:62:
cobc.c: In function 'turn_ec_io':
../libcob/common.h:338:21: warning: implicit declaration of function '_stricmp' [-Wimplicit-function-declaration]
#define strcasecmp _stricmp
^
cobc.c:1575:9: note: in expansion of macro 'strcasecmp'
if (!strcasecmp (f->name, (*ec_list)->text)) {
^
cobc.c: In function 'cobc_deciph_ec':
../libcob/common.h:337:22: warning: implicit declaration of function '_strnicmp' [-Wimplicit-function-declaration]
#define strncasecmp _strnicmp
^
cobc.c:1715:7: note: in expansion of macro 'strncasecmp'
if (strncasecmp (q, "ec-", 3)) {
^
mv -f .deps/cobc.Tpo .deps/cobc.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -MT ppparse.o -MD -MP -MF .deps/ppparse.Tpo -c -o ppparse.o ppparse.c
In file included from cobc.h:36:0,
from ppparse.y:43:
ppparse.y: In function 'ppp_define_add':
../libcob/common.h:338:21: warning: implicit declaration of function '_stricmp' [-Wimplicit-function-declaration]
#define strcasecmp _stricmp
^
ppparse.y:290:8: note: in expansion of macro 'strcasecmp'
if (!strcasecmp (name, l->name)) {
^
mv -f .deps/ppparse.Tpo .deps/ppparse.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -MT pplex.o -MD -MP -MF .deps/pplex.Tpo -c -o pplex.o pplex.c
In file included from cobc.h:36:0,
from pplex.l:95:
pplex.l: In function 'ppinput':
../libcob/common.h:337:22: warning: implicit declaration of function '_strnicmp' [-Wimplicit-function-declaration]
#define strncasecmp _strnicmp
^
pplex.l:1829:7: note: in expansion of macro 'strncasecmp'
if (strncasecmp(&buff[k],"XFD ",4) == 0) {
^
pplex.l: In function 'ppecho':
../libcob/common.h:338:21: warning: implicit declaration of function '_stricmp' [-Wimplicit-function-declaration]
#define strcasecmp _stricmp
^
pplex.l:2260:15: note: in expansion of macro 'strcasecmp'
} else if (strcasecmp (lno->text, queue->text)) {
^
mv -f .deps/pplex.Tpo .deps/pplex.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -MT parser.o -MD -MP -MF .deps/parser.Tpo -c -o parser.o parser.c
In file included from cobc.h:36:0,
from parser.y:41:
parser.y: In function 'begin_scope_of_program_name':
../libcob/common.h:338:21: warning: implicit declaration of function '_stricmp' [-Wimplicit-function-declaration]
#define strcasecmp _stricmp
^
parser.y:1198:23: note: in expansion of macro 'strcasecmp'
if (cb_fold_call && strcasecmp (prog_name, elt_name) == 0) {
^
mv -f .deps/parser.Tpo .deps/parser.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -MT scanner.o -MD -MP -MF .deps/scanner.Tpo -c -o scanner.o scanner.c
In file included from cobc.h:36:0,
from scanner.l:100:
scanner.l: In function 'yylex':
../libcob/common.h:338:21: warning: implicit declaration of function '_stricmp' [-Wimplicit-function-declaration]
#define strcasecmp _stricmp
^
scanner.l:960:10: note: in expansion of macro 'strcasecmp'
yylval = cb_build_reference (yytext);
^
scanner.l: In function 'cb_find_defined_program_by_name':
../libcob/common.h:338:21: error: '_stricmp' undeclared (first use in this function)
#define strcasecmp _stricmp
^
scanner.l:2578:15: note: in expansion of macro 'strcasecmp'
../libcob/common.h:338:21: note: each undeclared identifier is reported only once for each function it appears in
#define strcasecmp _stricmp
^
scanner.l:2578:15: note: in expansion of macro 'strcasecmp'
make[3]: *** [scanner.o] Error 1
make[3]: Leaving directory `/c/projects/gnucobol/cobc'
This possibly happened also before the first merge commit and is related to the additional header file in trunk which has the compiler defines.
The following warnings are older (all new files) - if you could do a (non-merge) commit to fix those this would be useful to reduce the noise:
make[2]: Entering directory `/c/projects/gnucobol/bin'
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -MT cobcrun.o -MD -MP -MF .deps/cobcrun.Tpo -c -o cobcrun.o cobcrun.c
mv -f .deps/cobcrun.Tpo .deps/cobcrun.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -o cobcrun.exe cobcrun.o -lintl ../libcob/libcob.la ../lib/libsupport.la
libtool: link: gcc -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -o .libs/cobcrun.exe cobcrun.o ../libcob/.libs/libcob.dll.a /mingw/lib/libgmp.dll.a -lpdcurses -lintl ../lib/.libs/libsupport.a -L/usr/local/lib -L/mingw/lib
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -MT gcdiff.o -MD -MP -MF .deps/gcdiff.Tpo -c -o gcdiff.o gcdiff.c
gcdiff.c: In function 'compare_file':
gcdiff.c:420:15: warning: pointer targets in passing argument 1 of 'fgets' differ in signedness [-Wpointer-sign]
while (fgets(rbuf,sizeof(rbuf),ref) != NULL) {
^
In file included from gcdiff.c:29:0:
c:\mingw\include\stdio.h:601:41: note: expected 'char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char * fgets (char *, int, FILE *);
^
gcdiff.c:421:18: warning: pointer targets in passing argument 1 of 'trim_line' differ in signedness [-Wpointer-sign]
k = trim_line (rbuf);
^
gcdiff.c:367:1: note: expected 'char *' but argument is of type 'unsigned char *'
trim_line(char *buf)
^
gcdiff.c:422:13: warning: pointer targets in passing argument 1 of 'fgets' differ in signedness [-Wpointer-sign]
if (fgets(nbuf,sizeof(nbuf),rslt) == NULL)
^
In file included from gcdiff.c:29:0:
c:\mingw\include\stdio.h:601:41: note: expected 'char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char * fgets (char *, int, FILE *);
^
gcdiff.c:424:18: warning: pointer targets in passing argument 1 of 'trim_line' differ in signedness [-Wpointer-sign]
j = trim_line (nbuf);
^
gcdiff.c:367:1: note: expected 'char *' but argument is of type 'unsigned char *'
trim_line(char *buf)
^
gcdiff.c:428:15: warning: pointer targets in passing argument 1 of 'strstr' differ in signedness [-Wpointer-sign]
if (strstr(rbuf, skip_lines[t].pat) != NULL) /* Is string on the line */
^
In file included from gcdiff.c:34:0:
c:\mingw\include\string.h:90:40: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strstr (const char *, const char *) __MINGW_ATTRIB_PURE;
^
gcdiff.c:444:18: warning: pointer targets in passing argument 1 of 'num_val' differ in signedness [-Wpointer-sign]
if (num_val(&nbuf[i+1], 2) <= 31) {
^
gcdiff.c:224:1: note: expected 'char *' but argument is of type 'unsigned char *'
num_val (char *s, int len)
^
gcdiff.c:487:32: warning: pointer targets in passing argument 1 of 'num_val' differ in signedness [-Wpointer-sign]
tval.tm_year = num_val (&nbuf[i], 4) - 1900;
^
gcdiff.c:224:1: note: expected 'char *' but argument is of type 'unsigned char *'
num_val (char *s, int len)
^
gcdiff.c:490:32: warning: pointer targets in passing argument 1 of 'num_val' differ in signedness [-Wpointer-sign]
tval.tm_year = num_val (&nbuf[i], 2);
^
gcdiff.c:224:1: note: expected 'char *' but argument is of type 'unsigned char *'
num_val (char *s, int len)
^
In file included from ../libcob.h:29:0,
from gcdiff.c:42:
../libcob/common.h:337:22: warning: implicit declaration of function '_strnicmp' [-Wimplicit-function-declaration]
#define strncasecmp _strnicmp
^
gcdiff.c:497:13: note: in expansion of macro 'strncasecmp'
if (strncasecmp(&nbuf[i],months[val],3) == 0) {
^
gcdiff.c:506:33: warning: pointer targets in passing argument 1 of 'num_val' differ in signedness [-Wpointer-sign]
tval.tm_min = num_val (&nbuf[i], 2);
^
gcdiff.c:224:1: note: expected 'char *' but argument is of type 'unsigned char *'
num_val (char *s, int len)
^
gcdiff.c:508:33: warning: pointer targets in passing argument 1 of 'num_val' differ in signedness [-Wpointer-sign]
tval.tm_mon = num_val (&nbuf[i], 2) - 1;
^
gcdiff.c:224:1: note: expected 'char *' but argument is of type 'unsigned char *'
num_val (char *s, int len)
^
gcdiff.c:519:32: warning: pointer targets in passing argument 1 of 'num_val' differ in signedness [-Wpointer-sign]
tval.tm_mday = num_val (&nbuf[i], 2);
^
gcdiff.c:224:1: note: expected 'char *' but argument is of type 'unsigned char *'
num_val (char *s, int len)
^
gcdiff.c:522:32: warning: pointer targets in passing argument 1 of 'num_val' differ in signedness [-Wpointer-sign]
tval.tm_mday = num_val (&nbuf[i], 2);
^
gcdiff.c:224:1: note: expected 'char *' but argument is of type 'unsigned char *'
num_val (char *s, int len)
^
gcdiff.c:525:32: warning: pointer targets in passing argument 1 of 'num_val' differ in signedness [-Wpointer-sign]
tval.tm_hour = num_val (&nbuf[i], 2);
^
gcdiff.c:224:1: note: expected 'char *' but argument is of type 'unsigned char *'
num_val (char *s, int len)
^
gcdiff.c:528:32: warning: pointer targets in passing argument 1 of 'num_val' differ in signedness [-Wpointer-sign]
tval.tm_min = num_val (&nbuf[i], 2);
^
gcdiff.c:224:1: note: expected 'char *' but argument is of type 'unsigned char *'
num_val (char *s, int len)
^
gcdiff.c:531:32: warning: pointer targets in passing argument 1 of 'num_val' differ in signedness [-Wpointer-sign]
tval.tm_sec = num_val (&nbuf[i], 2);
^
gcdiff.c:224:1: note: expected 'char *' but argument is of type 'unsigned char *'
num_val (char *s, int len)
^
gcdiff.c:632:19: warning: pointer targets in passing argument 1 of 'get_hex' differ in signedness [-Wpointer-sign]
rx = get_hex (&rbuf[i+2], &rval);
^
gcdiff.c:342:1: note: expected 'char *' but argument is of type 'unsigned char *'
get_hex(char *buf, long *val)
^
gcdiff.c:633:19: warning: pointer targets in passing argument 1 of 'get_hex' differ in signedness [-Wpointer-sign]
nx = get_hex (&nbuf[j+2], &nval);
^
gcdiff.c:342:1: note: expected 'char *' but argument is of type 'unsigned char *'
get_hex(char *buf, long *val)
^
gcdiff.c:662:12: warning: pointer targets in passing argument 1 of 'fgets' differ in signedness [-Wpointer-sign]
if(fgets(nbuf,sizeof(nbuf),rslt) != NULL) {
^
In file included from gcdiff.c:29:0:
c:\mingw\include\stdio.h:601:41: note: expected 'char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char * fgets (char *, int, FILE *);
^
gcdiff.c:664:19: warning: pointer targets in passing argument 1 of 'trim_line' differ in signedness [-Wpointer-sign]
j = trim_line (nbuf);
^
gcdiff.c:367:1: note: expected 'char *' but argument is of type 'unsigned char *'
trim_line(char *buf)
^
gcdiff.c:675:16: warning: pointer targets in passing argument 1 of 'fgets' differ in signedness [-Wpointer-sign]
while (fgets(nbuf,sizeof(nbuf),rslt) != NULL) {
^
In file included from gcdiff.c:29:0:
c:\mingw\include\stdio.h:601:41: note: expected 'char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char * fgets (char *, int, FILE *);
^
gcdiff.c:676:19: warning: pointer targets in passing argument 1 of 'trim_line' differ in signedness [-Wpointer-sign]
j = trim_line (nbuf);
^
gcdiff.c:367:1: note: expected 'char *' but argument is of type 'unsigned char *'
trim_line(char *buf)
^
gcdiff.c: In function 'main':
gcdiff.c:804:9: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
strcpy(conffile,"gcdiff.conf");
^
In file included from gcdiff.c:34:0:
c:\mingw\include\string.h:79:40: note: expected 'char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strcpy (char *, const char *);
^
gcdiff.c:805:14: warning: pointer targets in passing argument 1 of 'fopen' differ in signedness [-Wpointer-sign]
ref = fopen(conffile,"r");
^
In file included from gcdiff.c:29:0:
c:\mingw\include\stdio.h:260:41: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW FILE * fopen (const char *, const char *);
^
gcdiff.c:810:12: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness [-Wpointer-sign]
sprintf(conffile,"%s%cgcdiff.conf",env,PATHSEP_CHAR);
^
In file included from gcdiff.c:29:0:
c:\mingw\include\stdio.h:387:5: note: expected 'char *' but argument is of type 'unsigned char *'
int sprintf (char *__stream, const char *__format, ...)
^
gcdiff.c:812:12: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness [-Wpointer-sign]
sprintf(conffile,"%s%cgcdiff.conf",COB_CONFIG_DIR,PATHSEP_CHAR);
^
In file included from gcdiff.c:29:0:
c:\mingw\include\stdio.h:387:5: note: expected 'char *' but argument is of type 'unsigned char *'
int sprintf (char *__stream, const char *__format, ...)
^
gcdiff.c:814:15: warning: pointer targets in passing argument 1 of 'fopen' differ in signedness [-Wpointer-sign]
ref = fopen(conffile,"r");
^
In file included from gcdiff.c:29:0:
c:\mingw\include\stdio.h:260:41: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW FILE * fopen (const char *, const char *);
^
gcdiff.c:817:16: warning: pointer targets in passing argument 1 of 'fgets' differ in signedness [-Wpointer-sign]
while (fgets(buf,sizeof(buf),ref) != NULL) {
^
In file included from gcdiff.c:29:0:
c:\mingw\include\stdio.h:601:41: note: expected 'char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char * fgets (char *, int, FILE *);
^
gcdiff.c:818:19: warning: pointer targets in passing argument 1 of 'trim_line' differ in signedness [-Wpointer-sign]
k = trim_line (buf);
^
gcdiff.c:367:1: note: expected 'char *' but argument is of type 'unsigned char *'
trim_line(char *buf)
^
gcdiff.c:822:16: warning: pointer targets in passing argument 1 of 'set_option' differ in signedness [-Wpointer-sign]
set_option(conffile,opt,&buf[i]);
^
gcdiff.c:690:1: note: expected 'char *' but argument is of type 'unsigned char *'
set_option (char *binary, int opt, char *arg)
^
gcdiff.c:822:29: warning: pointer targets in passing argument 3 of 'set_option' differ in signedness [-Wpointer-sign]
set_option(conffile,opt,&buf[i]);
^
gcdiff.c:690:1: note: expected 'char *' but argument is of type 'unsigned char *'
set_option (char *binary, int opt, char *arg)
^
mv -f .deps/gcdiff.Tpo .deps/gcdiff.Po
/bin/sh ../libtool --tag=CC --mode=link gcc -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -o gcdiff.exe gcdiff.o -lintl ../libcob/libcob.la ../lib/libsupport.la
libtool: link: gcc -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -o .libs/gcdiff.exe gcdiff.o ../libcob/.libs/libcob.dll.a /mingw/lib/libgmp.dll.a -lpdcurses -lintl ../lib/.libs/libsupport.a -L/usr/local/lib -L/mingw/lib
gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I../lib -I../lib -O0 -ggdb3 -fasynchronous-unwind-tables -pipe -fsigned-char -Wall -Wwrite-strings -Wmissing-prototypes -Wno-format-y2k -MT cobfile.o -MD -MP -MF .deps/cobfile.Tpo -c -o cobfile.o cobfile.c
In file included from ../libcob.h:29:0,
from cobfile.c:42:
cobfile.c: In function 'matchWord':
../libcob/common.h:337:22: warning: implicit declaration of function '_strnicmp' [-Wimplicit-function-declaration]
#define strncasecmp _strnicmp
^
cobfile.c:371:6: note: in expansion of macro 'strncasecmp'
if (strncasecmp (defs + *pos, word, ln) != 0)
^
cobfile.c: In function 'parseFile':
cobfile.c:523:16: warning: pointer targets in passing argument 2 of 'getRecsz' differ in signedness [-Wpointer-sign]
getRecsz (fl, defs);
^
cobfile.c:442:1: note: expected 'char *' but argument is of type 'unsigned char *'
getRecsz (cob_file *fl, char *def)
^
cobfile.c:526:25: warning: pointer targets in passing argument 2 of 'cob_pre_open_def' differ in signedness [-Wpointer-sign]
cob_pre_open_def (fl, defs, fileindef, 1);
^
In file included from ../libcob.h:29:0,
from cobfile.c:42:
../libcob/common.h:2721:17: note: expected 'char *' but argument is of type 'unsigned char *'
COB_EXPIMP void cob_pre_open_def (cob_file *f, char *setdef, char *isdef, int checkit);
^
cobfile.c:545:25: warning: pointer targets in passing argument 2 of 'cob_pre_open_def' differ in signedness [-Wpointer-sign]
cob_pre_open_def (fl, defs, NULL, 0);
^
In file included from ../libcob.h:29:0,
from cobfile.c:42:
../libcob/common.h:2721:17: note: expected 'char *' but argument is of type 'unsigned char *'
COB_EXPIMP void cob_pre_open_def (cob_file *f, char *setdef, char *isdef, int checkit);
^
cobfile.c: In function 'main':
cobfile.c:932:9: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
strcpy(conffile,"cobfile.conf");
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:79:40: note: expected 'char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strcpy (char *, const char *);
^
cobfile.c:933:14: warning: pointer targets in passing argument 1 of 'fopen' differ in signedness [-Wpointer-sign]
ref = fopen(conffile,"r");
^
In file included from cobfile.c:29:0:
c:\mingw\include\stdio.h:260:41: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW FILE * fopen (const char *, const char *);
^
cobfile.c:936:12: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
if ((env = getenv("HOME")) != NULL) {
^
cobfile.c:937:12: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness [-Wpointer-sign]
sprintf(conffile,"%s/cobfile.conf",env);
^
In file included from cobfile.c:29:0:
c:\mingw\include\stdio.h:387:5: note: expected 'char *' but argument is of type 'unsigned char *'
int sprintf (char *__stream, const char *__format, ...)
^
cobfile.c:938:16: warning: pointer targets in passing argument 1 of 'fopen' differ in signedness [-Wpointer-sign]
ref = fopen(conffile,"r");
^
In file included from cobfile.c:29:0:
c:\mingw\include\stdio.h:260:41: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW FILE * fopen (const char *, const char *);
^
cobfile.c:943:12: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
if ((env = getenv("COB_CONFIG_DIR")) != NULL) {
^
cobfile.c:944:12: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness [-Wpointer-sign]
sprintf(conffile,"%s/cobfile.conf",env);
^
In file included from cobfile.c:29:0:
c:\mingw\include\stdio.h:387:5: note: expected 'char *' but argument is of type 'unsigned char *'
int sprintf (char *__stream, const char *__format, ...)
^
cobfile.c:946:12: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness [-Wpointer-sign]
sprintf(conffile,"%s/cobfile.conf",COB_CONFIG_DIR);
^
In file included from cobfile.c:29:0:
c:\mingw\include\stdio.h:387:5: note: expected 'char *' but argument is of type 'unsigned char *'
int sprintf (char *__stream, const char *__format, ...)
^
cobfile.c:948:15: warning: pointer targets in passing argument 1 of 'fopen' differ in signedness [-Wpointer-sign]
ref = fopen(conffile,"r");
^
In file included from cobfile.c:29:0:
c:\mingw\include\stdio.h:260:41: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW FILE * fopen (const char *, const char *);
^
cobfile.c:951:16: warning: pointer targets in passing argument 1 of 'fgets' differ in signedness [-Wpointer-sign]
while (fgets(buf,sizeof(buf),ref) != NULL) {
^
In file included from cobfile.c:29:0:
c:\mingw\include\stdio.h:601:41: note: expected 'char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char * fgets (char *, int, FILE *);
^
cobfile.c:952:19: warning: pointer targets in passing argument 1 of 'trim_line' differ in signedness [-Wpointer-sign]
k = trim_line (buf);
^
cobfile.c:241:1: note: expected 'char *' but argument is of type 'unsigned char *'
trim_line(char *buf)
^
cobfile.c:956:16: warning: pointer targets in passing argument 1 of 'set_option' differ in signedness [-Wpointer-sign]
set_option(conffile,opt,&buf[i]);
^
cobfile.c:696:1: note: expected 'char *' but argument is of type 'unsigned char *'
set_option (char *binary, int opt, char *arg)
^
cobfile.c:956:29: warning: pointer targets in passing argument 3 of 'set_option' differ in signedness [-Wpointer-sign]
set_option(conffile,opt,&buf[i]);
^
cobfile.c:696:1: note: expected 'char *' but argument is of type 'unsigned char *'
set_option (char *binary, int opt, char *arg)
^
cobfile.c:976:11: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
if ((env = getenv("COB_COPY_DIR")) != NULL) {
^
cobfile.c:977:24: warning: pointer targets in passing argument 1 of 'strdup' differ in signedness [-Wpointer-sign]
copysearch = strdup (env);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:135:40: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strdup (const char *) __MINGW_ATTRIB_MALLOC;
^
cobfile.c:979:11: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
if ((env = getenv("COBCPY")) != NULL) {
^
cobfile.c:981:25: warning: pointer targets in passing argument 1 of 'strdup' differ in signedness [-Wpointer-sign]
copysearch = strdup (env);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:135:40: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strdup (const char *) __MINGW_ATTRIB_MALLOC;
^
cobfile.c:983:24: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness [-Wpointer-sign]
p = malloc (strlen (env) + strlen (copysearch) + 3);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:83:41: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW size_t strlen (const char *) __MINGW_ATTRIB_PURE;
^
cobfile.c:984:12: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness [-Wpointer-sign]
sprintf(p, "%s%c%s",copysearch,PATHSEP_CHAR,env);
^
In file included from cobfile.c:29:0:
c:\mingw\include\stdio.h:387:5: note: expected 'char *' but argument is of type 'unsigned char *'
int sprintf (char *__stream, const char *__format, ...)
^
cobfile.c:986:15: warning: pointer targets in assignment differ in signedness [-Wpointer-sign]
copysearch = p;
^
cobfile.c:996:18: warning: pointer targets in passing argument 1 of 'getLine' differ in signedness [-Wpointer-sign]
while (getLine (buf)) {
^
cobfile.c:268:1: note: expected 'char *' but argument is of type 'unsigned char *'
getLine (char *buf)
^
In file included from ../libcob.h:29:0,
from cobfile.c:42:
../libcob/common.h:338:21: warning: implicit declaration of function '_stricmp' [-Wimplicit-function-declaration]
#define strcasecmp _stricmp
^
cobfile.c:997:7: note: in expansion of macro 'strcasecmp'
if (strcasecmp (buf, "quit;") == 0)
^
cobfile.c:1001:15: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness [-Wpointer-sign]
if ((strlen(buf) + k) >= (sizeof(cmd)-1)) {
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:83:41: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW size_t strlen (const char *) __MINGW_ATTRIB_PURE;
^
cobfile.c:1006:11: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
strcpy (&cmd[k], buf);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:79:40: note: expected 'char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strcpy (char *, const char *);
^
cobfile.c:1006:20: warning: pointer targets in passing argument 2 of 'strcpy' differ in signedness [-Wpointer-sign]
strcpy (&cmd[k], buf);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:79:40: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strcpy (char *, const char *);
^
cobfile.c:1007:14: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness [-Wpointer-sign]
k = strlen(cmd);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:83:41: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW size_t strlen (const char *) __MINGW_ATTRIB_PURE;
^
cobfile.c:1012:13: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
strcpy (indef, cmd+6);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:79:40: note: expected 'char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strcpy (char *, const char *);
^
cobfile.c:1012:20: warning: pointer targets in passing argument 2 of 'strcpy' differ in signedness [-Wpointer-sign]
strcpy (indef, cmd+6);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:79:40: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strcpy (char *, const char *);
^
cobfile.c:1016:13: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness [-Wpointer-sign]
strcpy (outdef, cmd+7);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:79:40: note: expected 'char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strcpy (char *, const char *);
^
cobfile.c:1016:21: warning: pointer targets in passing argument 2 of 'strcpy' differ in signedness [-Wpointer-sign]
strcpy (outdef, cmd+7);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:79:40: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strcpy (char *, const char *);
^
cobfile.c:1029:36: warning: pointer targets in passing argument 3 of 'matchWord' differ in signedness [-Wpointer-sign]
if (matchWord ("SKIP=", cmd, val, &k)) {
^
cobfile.c:354:1: note: expected 'char *' but argument is of type 'unsigned char *'
matchWord (const char *word, unsigned char *defs, char *str, int *pos )
^
cobfile.c:1030:21: warning: pointer targets in passing argument 1 of 'atoi' differ in signedness [-Wpointer-sign]
skip = atoi (val);
^
In file included from cobfile.c:30:0:
c:\mingw\include\stdlib.h:335:38: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW int atoi (const char *);
^
cobfile.c:1032:36: warning: pointer targets in passing argument 3 of 'matchWord' differ in signedness [-Wpointer-sign]
if (matchWord ("COPY=", cmd, val, &k)) {
^
cobfile.c:354:1: note: expected 'char *' but argument is of type 'unsigned char *'
matchWord (const char *word, unsigned char *defs, char *str, int *pos )
^
cobfile.c:1033:22: warning: pointer targets in passing argument 1 of 'atoi' differ in signedness [-Wpointer-sign]
ncopy = atoi (val);
^
In file included from cobfile.c:30:0:
c:\mingw\include\stdlib.h:335:38: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW int atoi (const char *);
^
cobfile.c:1038:16: warning: pointer targets in passing argument 1 of 'trim_line' differ in signedness [-Wpointer-sign]
trim_line (outdef);
^
cobfile.c:241:1: note: expected 'char *' but argument is of type 'unsigned char *'
trim_line(char *buf)
^
cobfile.c:1050:38: warning: pointer targets in passing argument 3 of 'matchWord' differ in signedness [-Wpointer-sign]
if (matchWord ("SKIPIF[", cmd, val, &k)) {
^
cobfile.c:354:1: note: expected 'char *' but argument is of type 'unsigned char *'
matchWord (const char *word, unsigned char *defs, char *str, int *pos )
^
cobfile.c:1054:36: warning: pointer targets in passing argument 3 of 'matchWord' differ in signedness [-Wpointer-sign]
if (matchWord ("SKIP=", cmd, val, &k)) {
^
cobfile.c:354:1: note: expected 'char *' but argument is of type 'unsigned char *'
matchWord (const char *word, unsigned char *defs, char *str, int *pos )
^
cobfile.c:1055:36: warning: pointer targets in passing argument 1 of 'atoi' differ in signedness [-Wpointer-sign]
sprintf (skipnum,"%d",atoi (val));
^
In file included from cobfile.c:30:0:
c:\mingw\include\stdlib.h:335:38: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW int atoi (const char *);
^
cobfile.c:1057:36: warning: pointer targets in passing argument 3 of 'matchWord' differ in signedness [-Wpointer-sign]
if (matchWord ("COBC[", cmd, val, &k)) {
^
cobfile.c:354:1: note: expected 'char *' but argument is of type 'unsigned char *'
matchWord (const char *word, unsigned char *defs, char *str, int *pos )
^
cobfile.c:1058:24: warning: pointer targets in passing argument 2 of 'strcpy' differ in signedness [-Wpointer-sign]
strcpy(cobcopts,val);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:79:40: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strcpy (char *, const char *);
^
cobfile.c:1060:36: warning: pointer targets in passing argument 3 of 'matchWord' differ in signedness [-Wpointer-sign]
if (matchWord ("COPY=", cmd, val, &k)) {
^
cobfile.c:354:1: note: expected 'char *' but argument is of type 'unsigned char *'
matchWord (const char *word, unsigned char *defs, char *str, int *pos )
^
cobfile.c:1061:36: warning: pointer targets in passing argument 1 of 'atoi' differ in signedness [-Wpointer-sign]
sprintf (copynum,"%d",atoi (val));
^
In file included from cobfile.c:30:0:
c:\mingw\include\stdlib.h:335:38: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW int atoi (const char *);
^
cobfile.c:1063:41: warning: pointer targets in passing argument 3 of 'matchWord' differ in signedness [-Wpointer-sign]
if (matchWord ("PROGRAMID=", cmd, val, &k)) {
^
cobfile.c:354:1: note: expected 'char *' but argument is of type 'unsigned char *'
matchWord (const char *word, unsigned char *defs, char *str, int *pos )
^
cobfile.c:1064:22: warning: pointer targets in passing argument 2 of 'strcpy' differ in signedness [-Wpointer-sign]
strcpy(progid,val);
^
In file included from cobfile.c:34:0:
c:\mingw\include\string.h:79:40: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW char *strcpy (char *, const char *);
^
cobfile.c:1083:14: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness [-Wpointer-sign]
sprintf (cmd,"cobc -x %s %s",cobcopts,cblout);
^
In file included from cobfile.c:29:0:
c:\mingw\include\stdio.h:387:5: note: expected 'char *' but argument is of type 'unsigned char *'
int sprintf (char *__stream, const char *__format, ...)
^
cobfile.c:1086:17: warning: pointer targets in passing argument 1 of 'system' differ in signedness [-Wpointer-sign]
k = system (cmd);
^
In file included from cobfile.c:30:0:
c:\mingw\include\stdlib.h:495:38: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW int system (const char *);
^
cobfile.c:1106:15: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness [-Wpointer-sign]
sprintf (cmd,"chmod a+x %s",cblout);
^
In file included from cobfile.c:29:0:
c:\mingw\include\stdio.h:387:5: note: expected 'char *' but argument is of type 'unsigned char *'
int sprintf (char *__stream, const char *__format, ...)
^
cobfile.c:1107:18: warning: pointer targets in passing argument 1 of 'system' differ in signedness [-Wpointer-sign]
k = system (cmd);
^
In file included from cobfile.c:30:0:
c:\mingw\include\stdlib.h:495:38: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW int system (const char *);
^
cobfile.c:1110:16: warning: pointer targets in passing argument 1 of 'sprintf' differ in signedness [-Wpointer-sign]
sprintf (cmd,"./%s",cblout);
^
In file included from cobfile.c:29:0:
c:\mingw\include\stdio.h:387:5: note: expected 'char *' but argument is of type 'unsigned char *'
int sprintf (char *__stream, const char *__format, ...)
^
cobfile.c:1111:19: warning: pointer targets in passing argument 1 of 'system' differ in signedness [-Wpointer-sign]
k = system (cmd);
^
In file included from cobfile.c:30:0:
c:\mingw\include\stdlib.h:495:38: note: expected 'const char *' but argument is of type 'unsigned char *'
_CRTIMP __cdecl __MINGW_NOTHROW int system (const char *);
^
Fails on MinGW (:
Do you mean the "old" MinGW-32 ? If so, should I add it to the CI to catch such errors ?
This possibly happened also before the first merge commit and is related to the additional header file in trunk which has the compiler defines.
Would merging r5244 from GC3 fix that (or make it worse) ? It removes the strcasecmp
and strcasecmp
defines from common.h
.
The following warnings are older (all new files) - if you could do a (non-merge) commit to fix those this would be useful to reduce the noise:
I'll do that ASAP.
Do you mean the "old" MinGW-32 ?
yes
If so, should I add it to the CI to catch such errors ?
that would be useful, but I don't know how easy or not that is; here's the appveyor definition used for "win32 posix ci" (note: as cygwin32 is explicitly not supported by its team any more and doesn't have the relevance as the old MinGW (small download size, working on older Windows versions) I do think about dropping that from CI), for MinGW updating BDB to the most current bnefore the license change and also building most current GMP and PDCursesMod (of course, cached)
version: 3.3-dev.{build}-win32-posix
image: Visual Studio 2015
clone_folder: c:\projects\gnucobol
init:
- cmd: "echo Installing libraries and headers\n\nif not exist \"%BUILD_BIN%\\\" mkdir \"%BUILD_BIN%\"\n\n\nrem cache C:\\MinGW\\msys\\1.0\\var\\cache\\mingw-get\\packages - doesn't help\nrem if \"%BUILD_TYPE%\"==\"MSYS\" appveyor DownloadFile \"https://www.arnoldtrembley.com/mingw-var.7z\" -FileName \"C:\\projects\\var.7z\" \nrem if \"%BUILD_TYPE%\"==\"MSYS\" 7z e \"C:\\projects\\var.7z\" \"cache\\mingw-get\\packages\\*\" -aoa -o\"C:\\MinGW\\msys\\1.0\\var\\cache\\mingw-get\\packages\\\" \nrem if \"%BUILD_TYPE%\"==\"MSYS\" C:\\MinGW\\bin\\mingw-get --print-uris install %MINGW_PACKAGES%\nrem if \"%BUILD_TYPE%\"==\"MSYS\" C:\\MinGW\\bin\\mingw-get install %MINGW_PACKAGES%\n\nif \"%BUILD_TYPE%\"==\"CYGWIN\" appveyor DownloadFile \"https://cygwin.com/setup-x86.exe\" -FileName \"%BUILD_BIN%\\..\\setup-x86.exe\" \nif \"%BUILD_TYPE%\"==\"CYGWIN\" %BUILD_BIN%\\..\\setup-x86.exe --allow-unsupported-windows -qnfNdO -R %BUILD_BIN%\\.. --site http://ctm.crouchingtigerhiddenfruitbat.org/pub/cygwin/circa/2022/11/23/063457 -l %BUILD_BIN%\\..\\var\\cache\\setup -P %CYG_PACKAGES%\n\nif \"%BUILD_TYPE%\"==\"CYGWIN64\" appveyor DownloadFile \"https://cygwin.com/setup-x86_64.exe\" -FileName \"%BUILD_BIN%\\..\\setup-x86_64.exe\"\nif \"%BUILD_TYPE%\"==\"CYGWIN64\" %BUILD_BIN%\\..\\setup-x86_64.exe -qnfNdO -R %BUILD_BIN%\\.. -s https://cygwin.mirror.constant.com -l %BUILD_BIN%\\..\\var\\cache\\setup -P %CYG_PACKAGES%\n\n\necho Get cJSON\nif not exist \"%CJSON_ARCHIVE%\" appveyor DownloadFile \"https://github.com/DaveGamble/cJSON/archive/%CJSON_ARCHIVE%\"\n\nrem powershell.exe -Command \"& {$blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))}\""
environment:
CYG_PACKAGES: libgmp-devel,libncurses-devel,libdb-devel,libxml2-devel,libjson-c-devel,libiconv-devel,automake,make,gcc-core,gettext-devel,libtool,bison,flex,help2man
CJSON_VERSION: 1.7.18
CJSON_ARCHIVE: v%CJSON_VERSION%.tar.gz
MINGW_CONFIGURE_FLAGS: --enable-debug
MINGW_PACKAGES: mingw32-libpdcurses mingw32-pdcurses mingw32-gmp
NEWCOB: tests\cobol85\newcob.val
PROJECT_SLUG_UBUNTU: gnucobol-3-x
PACKAGE_VERSION: 3.3-dev
MINGW_BDB_VERS: db-6.0.19.NC
MINGW_GMP_VERS: gmp-6.3.0
MINGW_PDCM_VERS: 4.4.0
matrix:
- BUILD_TYPE: MSYS
BUILD_BIN: C:\MinGW\msys\1.0\bin
- BUILD_TYPE: CYGWIN64
BUILD_BIN: C:\cygwin64\bin
- BUILD_TYPE: CYGWIN
BUILD_BIN: C:\cygwin32\bin
install:
- cmd: >-
if "%BUILD_TYPE%"=="MSYS" echo build and install GNU Multiple Precision Arithmetic Library %MINGW_GMP_VERS%
if "%BUILD_TYPE%"=="MSYS" if not exist "%MINGW_GMP_VERS%" appveyor DownloadFile "https://gmplib.org/download/gmp/%MINGW_GMP_VERS%.tar.xz" -FileName "%MINGW_GMP_VERS%.tar.xz"
if "%BUILD_TYPE%"=="MSYS" if not exist "%MINGW_GMP_VERS%" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\" && tar -xvf %MINGW_GMP_VERS%.tar.xz"
if "%BUILD_TYPE%"=="MSYS" if not exist "%MINGW_GMP_VERS%\config.log" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\%MINGW_GMP_VERS%\" && ./configure --prefix=/mingw --enable-fat --enable-shared --disable-static CFLAGS=\"-Wno-attributes -Wno-ignored-attributes\" ABI=32 && make"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\%MINGW_GMP_VERS%\" && make install"
if "%BUILD_TYPE%"=="MSYS" appveyor AddMessage "MinGW setup for GMP %MINGW_GMP_VERS% done"
if "%BUILD_TYPE%"=="MSYS" echo build and install PDCursesMod %MINGW_PDCM_VERS%
if "%BUILD_TYPE%"=="MSYS" if not exist "PDCursesMod-%MINGW_PDCM_VERS%" appveyor DownloadFile "https://github.com/Bill-Gray/PDCursesMod/archive/refs/tags/v%MINGW_PDCM_VERS%.tar.gz" -FileName "PDCursesMod-%MINGW_PDCM_VERS%.tar.xz"
if "%BUILD_TYPE%"=="MSYS" if not exist "PDCursesMod-%MINGW_PDCM_VERS%" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\" && tar -xvf PDCursesMod-%MINGW_PDCM_VERS%.tar.xz"
if "%BUILD_TYPE%"=="MSYS" if not exist "PDCursesMod-%MINGW_PDCM_VERS%\pdcurses.h" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\PDCursesMod-%MINGW_PDCM_VERS%\wincon\" && make INFOEX=N CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll"
if "%BUILD_TYPE%"=="MSYS" if not exist "PDCursesMod-%MINGW_PDCM_VERS%\pdcurses.h" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\PDCursesMod-%MINGW_PDCM_VERS%\wingui\" && make CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll"
if "%BUILD_TYPE%"=="MSYS" if not exist "PDCursesMod-%MINGW_PDCM_VERS%\pdcurses.h" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\PDCursesMod-%MINGW_PDCM_VERS%\vt\" && make CHTYPE_64=Y DEBUG=Y DLL=Y DLLNAME=libpdcurses LIBNAME=libpdcurses.dll CFLAGS=\"-Wall -Wextra -pedantic -g -DPDCDEBUG -fPIC -DPDC_DLL_BUILD\""
if "%BUILD_TYPE%"=="MSYS" if not exist "PDCursesMod-%MINGW_PDCM_VERS%\pdcurses.h" echo #define CHTYPE_64 > "PDCursesMod-%MINGW_PDCM_VERS%\pdcurses.h" && echo #define PDC_DLL_BUILD >> "PDCursesMod-%MINGW_PDCM_VERS%\pdcurses.h" && echo #include "pdcurses/curses.h" >> "PDCursesMod-%MINGW_PDCM_VERS%\pdcurses.h"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\PDCursesMod-%MINGW_PDCM_VERS%\" && install wincon/libpdcurses.dll.a /mingw/lib/"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\PDCursesMod-%MINGW_PDCM_VERS%\" && install wincon/libpdcurses.dll /mingw/bin/"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\PDCursesMod-%MINGW_PDCM_VERS%\" && install wincon/libpdcurses.dll /mingw/bin/libpdcurses-wincon.dll"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\PDCursesMod-%MINGW_PDCM_VERS%\" && install wingui/libpdcurses.dll /mingw/bin/libpdcurses-wingui.dll"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\PDCursesMod-%MINGW_PDCM_VERS%\" && install vt/libpdcurses.dll /mingw/bin/libpdcurses-vt.dll"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "install -d /mingw/include/pdcurses"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\PDCursesMod-%MINGW_PDCM_VERS%\" && install -m 0644 curses.h panel.h term.h /mingw/include/pdcurses/"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\PDCursesMod-%MINGW_PDCM_VERS%\" && install -m 0644 pdcurses.h /mingw/include/"
if "%BUILD_TYPE%"=="MSYS" appveyor AddMessage "MinGW setup for PDCursesMod %MINGW_PDCM_VERS% done"
if "%BUILD_TYPE%"=="MSYS" echo build and install Berkeley DB %MINGW_BDB_VERS%
if "%BUILD_TYPE%"=="MSYS" if not exist "%MINGW_BDB_VERS%" appveyor DownloadFile "https://download.oracle.com/berkeley-db/%MINGW_BDB_VERS%.tar.gz" -FileName "%MINGW_BDB_VERS%.tar.gz"
rem if "%BUILD_TYPE%"=="MSYS" if not exist "%MINGW_BDB_VERS%" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\" && gzip -d %MINGW_BDB_VERS%.tar.gz && tar --delete --wildcards -f %MINGW_BDB_VERS%.tar %MINGW_BDB_VERS%/*java %MINGW_BDB_VERS%/perl %MINGW_BDB_VERS%/build_* %MINGW_BDB_VERS%/examples_*"
rem if "%BUILD_TYPE%"=="MSYS" if not exist "%MINGW_BDB_VERS%" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\" && tar -xvf %MINGW_BDB_VERS%.tar && rm %MINGW_BDB_VERS%.tar"
if "%BUILD_TYPE%"=="MSYS" if not exist "%MINGW_BDB_VERS%" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\" && tar -xvf %MINGW_BDB_VERS%.tar.gz && sed -i 's/_tcsclen/strlen/' %MINGW_BDB_VERS%/src/os_windows/os_stat.c"
if "%BUILD_TYPE%"=="MSYS" if not exist "%MINGW_BDB_VERS%\build_unix\config.log" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\%MINGW_BDB_VERS%\build_unix\" && ../dist/configure --prefix=/mingw --enable-mingw --enable-debug --disable-static --disable-replication --disable-tcl LIBCSO_LIBS=-lwsock32 && make || make"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\%MINGW_BDB_VERS%\build_unix\" && make install"
if "%BUILD_TYPE%"=="MSYS" appveyor AddMessage "MinGW setup for Berkeley DB %MINGW_BDB_VERS% done"
if "%BUILD_TYPE%"=="MSYS" if "%EXTERNAL_JOB_ID%"=="" (set "URL=%APPVEYOR_URL%/api/projects/%APPVEYOR_ACCOUNT_NAME%/%PROJECT_SLUG_UBUNTU%/artifacts/gnucobol-%PACKAGE_VERSION%.tar.gz?job=Image: Ubuntu2004") else (set "URL=%APPVEYOR_URL%/api/buildjobs/%EXTERNAL_JOB_ID%/artifacts/gnucobol-%PACKAGE_VERSION%.tar.gz")
if "%BUILD_TYPE%"=="MSYS" echo URL to download is: %URL%
if "%BUILD_TYPE%"=="MSYS" appveyor DownloadFile "%URL%" -FileName artifact.tar.gz
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\" && tar -xf \"artifact.tar.gz\" --directory=/tmp && cp -r -u /tmp/gnucobol-*/* ."
if "%BUILD_TYPE%"=="MSYS" if not exist "%NEWCOB%" appveyor DownloadFile "https://sourceforge.net/projects/gnucobol/files/nist/newcob.val.tar.gz/download" -FileName "%NEWCOB%.tar.gz"
if "%BUILD_TYPE%"=="CYGWIN" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\" && ./autogen.sh install"
if "%BUILD_TYPE%"=="CYGWIN64" %BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\" && ./build_aux/bootstrap install"
%BUILD_BIN%\bash -lc "cd \"%APPVEYOR_BUILD_FOLDER%\" && tar -xf \"$CJSON_ARCHIVE\" && cp -p cJSON-$CJSON_VERSION/cJSON.* libcob/"
appveyor AddMessage "Build environment for %BUILD_TYPE% is created"
cache:
- '%NEWCOB%'
- '%CJSON_ARCHIVE%'
- '%MINGW_GMP_VERS%'
- '%MINGW_BDB_VERS%'
- PDCursesMod-%MINGW_PDCM_VERS%
- '%BUILD_BIN%\..\setup-x86.exe'
- '%BUILD_BIN%\..\setup-x86_64.exe'
build_script:
- cmd: >-
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"c:\projects\gnucobol\" && ./configure %MINGW_CONFIGURE_FLAGS%"
rem LIBCOB_CPPFLAGS=\"-DNCURSES_MOUSE_VERSION=2\"
if "%BUILD_TYPE:~0,6%"=="CYGWIN" %BUILD_BIN%\bash -lc "cd \"c:\projects\gnucobol\" && ./configure %CYG_CONFIGURE_FLAGS%"
appveyor AddMessage "configuration for %BUILD_TYPE% is finished"
appveyor PushArtifact config.log
appveyor PushArtifact config.h
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"c:\projects\gnucobol\" && make"
if "%BUILD_TYPE:~0,6%"=="CYGWIN" %BUILD_BIN%\bash -lc "cd \"c:\projects\gnucobol\" && make -j2"
appveyor AddMessage "build for %BUILD_TYPE% is finished"
test_script:
- cmd: >-
rem %BUILD_BIN%\bash -lc "cd \"C:\projects\gnucobol\" && (make check TESTSUITEFLAGS=\"--jobs=3\" || appveyor AddMessage \"Internal Tests failed\" -Category Error)"
%BUILD_BIN%\bash -lc "cd \"C:\projects\gnucobol\" && (make check || make check TESTSUITEFLAGS=\"--recheck --verbose\" || appveyor AddMessage \"Internal Tests failed\" -Category Error)"
appveyor AddMessage "internal testsuite is finished"
if "%BUILD_TYPE:~0,6%"=="CYGWIN" %BUILD_BIN%\bash -lc "cd \"C:\projects\gnucobol\" && (make -j3 test || (appveyor AddMessage \"NIST Tests failed\" -Category Error && false))"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"C:\projects\gnucobol\" && (make test || (appveyor AddMessage \"NIST Tests failed\" -Category Error && false))"
appveyor AddMessage "NIST testsuite is finished"
if "%BUILD_TYPE%"=="MSYS" %BUILD_BIN%\bash -lc "cd \"C:\projects\gnucobol\" && make distmingwdir"
artifacts:
- path: config.log
name: configuration for this build
- path: tests/testsuite.log
name: testsuite results
- path: tests/cobol85/summary.log
name: NIST results (summary)
- path: GnuCOBOL_mingw
name: gnucobol-%PACKAGE_VERSION%-MinGW-binaries
- path: GnuCOBOL_mingw_dbg
name: gnucobol-%PACKAGE_VERSION%-MinGW-binaries (debug)
Would merging r5244 from GC3 fix that (or make it worse) ? It removes the
strcasecmp
andstrcasecmp
defines fromcommon.h
.
As a bunch of other code is not merged that is touched by that, it would not be useful to merge that revision and I guess the defines moved to other places in trunk in any case.
Bringing the applied definitions around that "in line" (likely manually if we want that "soon") between 3.x and trunk would solve that as those errors don't exist in 3.x - compare https://ci.appveyor.com/project/GitMensch/gnucobol-3-x-win32-posix/build/job/lr2o0eaysixkmnuc?fullLog=true and https://ci.appveyor.com/project/GitMensch/gnucobol-trunk-win32-posix/build/job/uaesoldyr7how6yd?fullLog=true
hm, possibly the gc4 branch should have been update from master instead and this PR kept open`(after rebase)? But even then this could be recreated later on.
Best wishes for the enxt bunch and possibly the addition of "good old MSYS mingw32" to CI,
Yeah, "accidentally" pushed to the gc4 branch, which automatically closed this PR which I can't reopen 😅
Fails on MinGW (:
I wasn't able to reproduce the failure, neither using the new "MSYS 1 / MinGW 32" CI or locally on our Windows machine (regardless the state of the --enable-debug
option).
That being said, I had to adjust the build process compared with what you had in AppVeyor...
@GitMensch (I don't know if you receive notifications on merged PRs ?)
This PR is only dedicated to running CI in the context of forward-porting GC3 patches to GC4.