@walkero
HI with gcc 13:
...
main.c:839:3: warning: 'AllocVec' is deprecated [-Wdeprecated-declarations]
839 | if( (dup=AllocVec(length+1, MEMF_CLEAR)) )
| ^~
/SDK/include/include_h/interfaces/exec.h:42:35: note: declared here
42 | DEPRECATED APTR APICALL (*AllocVec)(struct ExecIFace *Self, ULONG byteSize, ULONG attributes);
| ^~~~~~~~
main.c: In function 'error_message':
main.c:923:43: warning: passing argument 1 of '__builtin_getlinearva' from incompatible pointer type [-Wincompatible-pointer-types]
923 | APTR vargs = VA_ARG(args, APTR);
| ^~~~~~
| |
| __va_list_tag (*)[1]
main.c:923:43: note: expected '__va_list_tag *' but argument is of type '__va_list_tag (*)[1]'
Linking RSGUI.debug...
#gcc -v
Using built-in specs.
COLLECT_GCC=/Devel/SDK/gcc/ppc-amigaos/bin/13.5.0/gcc
...
Supported LTO compression algorithms: zlib
gcc version 13.5.0 (adtools build 13.5.0)
#
Wrning on " 923 | APTR vargs = VA_ARG(args, APTR);"
while with v15:
..
main.c:839:3: warning: 'AllocVec' is deprecated [-Wdeprecated-declarations]
839 | if( (dup=AllocVec(length+1, MEMF_CLEAR)) )
| ^~
/SDK/include/include_h/interfaces/exec.h:42:35: note: declared here
42 | DEPRECATED APTR APICALL (*AllocVec)(struct ExecIFace *Self, ULONG byteSize, ULONG attributes);
| ^~~~~~~~
main.c: In function 'error_message':
main.c:923:43: error: passing argument 1 of '__builtin_getlinearva' from incompatible pointer type [-Wincompatible-pointer-types]
923 | APTR vargs = VA_ARG(args, APTR);
| ^~~~~~
| |
| __va_list_tag (*)[1]
main.c:923:43: note: expected '__va_list_tag *' but argument is of type '__va_list_tag (*)[1]'
make: *** [Makefile_GCC:136: main.o] Error 1
#gcc -v
Using built-in specs.
COLLECT_GCC=/Devel/SDK/gcc/ppc-amigaos/bin/15.3.0/gcc
...
Supported LTO compression algorithms: zlib
gcc version 15.3.0 (adtools build 15.3.0)
#
same line shwos as Error "main.c:923:43: error: passing argument 1 of '__builtin_getlinearva' from incompatible pointer type [-Wincompatible-pointer-types]
923 | APTR vargs = VA_ARG(args, APTR);"
Is it bad codding?
TiA
Snippet of sucha warning/error:
VA_START(args, message);
if(MUIMasterBase)
{
btn_sel = MUI_Request(NULL, NULL, 0, PROGNAME,
buttons? (STRPTR)buttons : (STRPTR)GetString(&li,MSG_OK_BUTTON_PLAIN),
(STRPTR)message, args);
}
else
{
struct EasyStruct es;
APTR vargs = VA_ARG(args, APTR);
es.es_StructSize = sizeof(struct EasyStruct);
es.es_Flags = 0L;
es.es_Title = PROGNAME;
es.es_TextFormat = message;
es.es_GadgetFormat = buttons? buttons : GetString(&li,MSG_OK_BUTTON_PLAIN),
btn_sel = EasyRequestArgs(NULL, &es, 0L, vargs);
}
VA_END(args);
source code (
https://aminet.net/package/comm/net/RSGUI)