Am 29.01.21 um 11:06 schrieb Daniel P. Berrangé:
On Thu, Jan 28, 2021 at 06:15:23PM +0100, Stefan Weil wrote:
This fixes several compiler warnings on MacOS with Homebrew.
Could you give an example of the warnings seen as I'm wondering
why we won't have seen them already on other platforms ?
Here they are (at least the first few, as the list is lengthy). I used
../configure --enable-sanitizers --enable-debug
--extra-cflags=-I/opt/homebrew/include --enable-cocoa
Maybe the warnings were enabled by --enable-debug.
Regards, Stefan
% ninja
[4696/4942] Compiling C object
tests/test-crypto-tlscredsx509.p/test-crypto-tlscredsx509.c.o
In file included from ../../../tests/test-crypto-tlscredsx509.c:23:
../../../tests/crypto-tls-x509-helpers.h:128:14: warning:
'ASN1_ARRAY_TYPE' macro is deprecated, use 'asn1_static_node' instead.
[-W#pragma-messages]
extern const ASN1_ARRAY_TYPE pkix_asn1_tab[];
^
/opt/homebrew/Cellar/libtasn1/4.16.0/include/libtasn1.h:582:25: note:
expanded from macro 'ASN1_ARRAY_TYPE'
#define ASN1_ARRAY_TYPE _Pragma ("GCC warning \"'ASN1_ARRAY_TYPE' macro
is deprecated, use 'asn1_static_node' instead.\"") asn1_static_node
^
<scratch space>:18:6: note: expanded from here
GCC warning "'ASN1_ARRAY_TYPE' macro is deprecated, use
'asn1_static_node' instead."
^
1 warning generated.
[4700/4942] Compiling C object
tests/test-crypto-tlscredsx509.p/pkix_asn1_tab.c.o
In file included from ../../../tests/pkix_asn1_tab.c:7:
/Users/stefan/src/github/qemu/qemu/tests/crypto-tls-x509-helpers.h:128:14:
warning: 'ASN1_ARRAY_TYPE' macro is deprecated, use 'asn1_static_node'
instead. [-W#pragma-messages]
extern const ASN1_ARRAY_TYPE pkix_asn1_tab[];
^
/opt/homebrew/Cellar/libtasn1/4.16.0/include/libtasn1.h:582:25: note:
expanded from macro 'ASN1_ARRAY_TYPE'
#define ASN1_ARRAY_TYPE _Pragma ("GCC warning \"'ASN1_ARRAY_TYPE' macro
is deprecated, use 'asn1_static_node' instead.\"") asn1_static_node
^
<scratch space>:18:6: note: expanded from here
GCC warning "'ASN1_ARRAY_TYPE' macro is deprecated, use
'asn1_static_node' instead."
^
../../../tests/pkix_asn1_tab.c:11:7: warning: 'ASN1_ARRAY_TYPE' macro is
deprecated, use 'asn1_static_node' instead. [-W#pragma-messages]
const ASN1_ARRAY_TYPE pkix_asn1_tab[] = {
^
/opt/homebrew/Cellar/libtasn1/4.16.0/include/libtasn1.h:582:25: note:
expanded from macro 'ASN1_ARRAY_TYPE'
#define ASN1_ARRAY_TYPE _Pragma ("GCC warning \"'ASN1_ARRAY_TYPE' macro
is deprecated, use 'asn1_static_node' instead.\"") asn1_static_node
^
<scratch space>:20:6: note: expanded from here
GCC warning "'ASN1_ARRAY_TYPE' macro is deprecated, use
'asn1_static_node' instead."
^
2 warnings generated.
[4701/4942] Compiling C object
tests/test-crypto-tlscredsx509.p/crypto-tls-x509-helpers.c.o
In file included from ../../../tests/crypto-tls-x509-helpers.c:23:
../../../tests/crypto-tls-x509-helpers.h:128:14: warning:
'ASN1_ARRAY_TYPE' macro is deprecated, use 'asn1_static_node' instead.
[-W#pragma-messages]
extern const ASN1_ARRAY_TYPE pkix_asn1_tab[];
^
/opt/homebrew/Cellar/libtasn1/4.16.0/include/libtasn1.h:582:25: note:
expanded from macro 'ASN1_ARRAY_TYPE'
#define ASN1_ARRAY_TYPE _Pragma ("GCC warning \"'ASN1_ARRAY_TYPE' macro
is deprecated, use 'asn1_static_node' instead.\"") asn1_static_node
^
<scratch space>:18:6: note: expanded from here
GCC warning "'ASN1_ARRAY_TYPE' macro is deprecated, use
'asn1_static_node' instead."
^
../../../tests/crypto-tls-x509-helpers.c:33:1: warning: 'ASN1_TYPE'
macro is deprecated, use 'asn1_node' instead. [-W#pragma-messages]
ASN1_TYPE pkix_asn1;
^
/opt/homebrew/Cellar/libtasn1/4.16.0/include/libtasn1.h:537:19: note:
expanded from macro 'ASN1_TYPE'
#define ASN1_TYPE _Pragma ("GCC warning \"'ASN1_TYPE' macro is
deprecated, use 'asn1_node' instead.\"") asn1_node
^
<scratch space>:117:6: note: expanded from here
GCC warning "'ASN1_TYPE' macro is deprecated, use 'asn1_node' instead."
^
../../../tests/crypto-tls-x509-helpers.c:142:33: warning: 'ASN1_TYPE'
macro is deprecated, use 'asn1_node' instead. [-W#pragma-messages]
static void test_tls_der_encode(ASN1_TYPE src,
^
/opt/homebrew/Cellar/libtasn1/4.16.0/include/libtasn1.h:537:19: note:
expanded from macro 'ASN1_TYPE'
#define ASN1_TYPE _Pragma ("GCC warning \"'ASN1_TYPE' macro is
deprecated, use 'asn1_node' instead.\"") asn1_node
^
<scratch space>:119:6: note: expanded from here
GCC warning "'ASN1_TYPE' macro is deprecated, use 'asn1_node' instead."
^
../../../tests/crypto-tls-x509-helpers.c:320:9: warning: 'ASN1_TYPE'
macro is deprecated, use 'asn1_node' instead. [-W#pragma-messages]
ASN1_TYPE ext = ASN1_TYPE_EMPTY;
^
/opt/homebrew/Cellar/libtasn1/4.16.0/include/libtasn1.h:537:19: note:
expanded from macro 'ASN1_TYPE'
#define ASN1_TYPE _Pragma ("GCC warning \"'ASN1_TYPE' macro is
deprecated, use 'asn1_node' instead.\"") asn1_node
^
<scratch space>:128:6: note: expanded from here
GCC warning "'ASN1_TYPE' macro is deprecated, use 'asn1_node' instead."
^
../../../tests/crypto-tls-x509-helpers.c:320:25: warning:
'ASN1_TYPE_EMPTY' macro is deprecated, use 'NULL' instead.
[-W#pragma-messages]
ASN1_TYPE ext = ASN1_TYPE_EMPTY;
^
/opt/homebrew/Cellar/libtasn1/4.16.0/include/libtasn1.h:552:25: note:
expanded from macro 'ASN1_TYPE_EMPTY'
#define ASN1_TYPE_EMPTY _Pragma ("GCC warning \"'ASN1_TYPE_EMPTY' macro
is deprecated, use 'NULL' instead.\"") NULL
^
<scratch space>:130:6: note: expanded from here
GCC warning "'ASN1_TYPE_EMPTY' macro is deprecated, use 'NULL' instead."
^
../../../tests/crypto-tls-x509-helpers.c:347:9: warning: 'ASN1_TYPE'
macro is deprecated, use 'asn1_node' instead. [-W#pragma-messages]
ASN1_TYPE ext = ASN1_TYPE_EMPTY;
^