On 10-Oct-16 06:45, Aki Tuomi wrote:
Does your build end at some particular point? See **** DETAILS **** for in depth (I hope enough!) study/report.
Aki
I would guess this is not "c99" way...
Making all in lib-http
source='test-http-auth.c' object='test-http-auth.o' libtool=no
DEPDIR=.deps depmode=xlc /bin/sh ../../depcomp xlc_r -DHAVE_CONFIG_H
-I. -I../.. -I../../src/lib -I../../src/lib-test -I../../src/lib-dns
-I../../src/lib-ssl-iostream -I../../src/lib-master -I/opt/include
-I/opt/buildaix/include -I/opt/include -O2 -qmaxmem=-1 -qarch=pwr5
-I/opt/buildaix/includes -c -o test-http-auth.o test-http-auth.c
"test-http-auth.c", line 27.27: 1506-022 (S) "scheme" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 27.37: 1506-196 (W) Initialization between
types "struct http_auth_challenge_test* const" and "char*" is not allowed.
"test-http-auth.c", line 28.33: 1506-022 (S) "data" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 28.41: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 29.33: 1506-022 (S) "params" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 30.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 30.52: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 30.70: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 30.76: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 33.33: 1506-022 (S) "scheme" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 33.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 43.27: 1506-022 (S) "scheme" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 43.37: 1506-196 (W) Initialization between
types "struct http_auth_challenge_test* const" and "char*" is not allowed.
"test-http-auth.c", line 44.33: 1506-022 (S) "data" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 44.41: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 45.33: 1506-022 (S) "params" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 46.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 46.52: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 47.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 47.50: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 48.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 48.52: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 49.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 49.53: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 50.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 50.49: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 53.33: 1506-022 (S) "scheme" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 53.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 60.27: 1506-022 (S) "scheme" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 60.37: 1506-196 (W) Initialization between
types "struct http_auth_challenge_test* const" and "char*" is not allowed.
"test-http-auth.c", line 61.33: 1506-022 (S) "data" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 61.41: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 62.33: 1506-022 (S) "params" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 63.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 63.52: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 64.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 64.51: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 65.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 65.52: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 66.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 66.49: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 69.33: 1506-022 (S) "scheme" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 69.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 70.33: 1506-022 (S) "data" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 70.41: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 71.33: 1506-022 (S) "params" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 72.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 72.52: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 73.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 73.49: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 76.33: 1506-022 (S) "scheme" is not a member of
"const struct http_auth_challenges_test".
"test-http-auth.c", line 76.43: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 187.27: 1506-196 (W) Initialization between
types "struct http_auth_param* const" and "char*" is not allowed.
"test-http-auth.c", line 187.39: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 188.27: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 188.36: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 189.27: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 189.36: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 190.27: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 190.34: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 191.27: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 191.34: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 192.27: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 192.33: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 193.27: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 193.37: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 194.27: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 194.39: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 195.27: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 195.37: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 196.27: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
"test-http-auth.c", line 196.33: 1506-026 (S) Number of initializers
cannot be greater than the number of aggregate members.
make: 1254-004 The error code from the last command is 1.
Stop. make: 1254-004 The error code from the last command is 1.
**** DETAILS ********* Looking at the first error (I think is "killing") see line 27 through line 30 and the message:
"test-http-auth.c", line 27.27: 1506-022 (S) "scheme" is not a member of "const struct http_auth_challenges_test". "test-http-auth.c", line 27.37: 1506-196 (W) Initialization between types "struct http_auth_challenge_test* const" and "char*" is not allowed. "test-http-auth.c", line 28.33: 1506-022 (S) "data" is not a member of "const struct http_auth_challenges_test". "test-http-auth.c", line 28.41: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 29.33: 1506-022 (S) "params" is not a member of "const struct http_auth_challenges_test". "test-http-auth.c", line 30.43: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 30.52: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 30.70: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 30.76: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members.
+21 /* Valid auth challenges tests */
+22 static const struct http_auth_challenges_test
+23 valid_auth_challenges_tests[] = {
+24 {
+25 .challenges_in = "Basic realm=\"WallyWorld\"",
+26 .challenges = (struct http_auth_challenge_test
[]) { +27 { .scheme = "Basic", +28 .data = NULL, +29 .params = (struct http_auth_param []) { +30 { "realm", "WallyWorld" }, { NULL, NULL } +31 } +32 },{ +33 .scheme = NULL +34 } +35 } +36 },{
Adding -E to the compile command gives the following extraction from the .i file:
source='test-http-auth.c' object='test-http-auth.o' libtool=no
DEPDIR=.deps depmode=xlc /bin/sh ../../depcomp xlc_r -E -DHAVE_CONFIG_H
-I. -I../.. -I../../src/lib -I..
/../src/lib-test -I../../src/lib-dns -I../../src/lib-ssl-iostream
-I../../src/lib-master -I/opt/include -I/opt/buildaix/include
-I/opt/include -O2 -qmaxmem=-1 -qarch=
pwr5 -I/opt/buildaix/includes -c -o test-http-auth.o test-http-auth.c
test-http-auth.i
#line 6 "http-auth.h" struct http_auth_param; struct http_auth_challenge; struct http_auth_credentials;
union array__http_auth_param { struct array arr; struct http_auth_param const *const *v; struct http_auth_param **v_modifiable; }; union array__http_auth_challenge { struct array arr; struct http_auth_challenge const *const *v; struct http_auth_challenge **v_modifiable; };
struct http_auth_param { const char *name; const char *value; };
struct http_auth_challenge { const char *scheme; const char *data; union array__http_auth_param params; };
struct http_auth_credentials { const char *scheme; const char *data; union array__http_auth_param params; }; #line 34 int http_auth_parse_challenges(const unsigned char *data, size_t size, union array__http_auth_challenge *chlngs); int http_auth_parse_credentials(const unsigned char *data, size_t size, struct http_auth_credentials *crdts); #line 43
I do not see any "const struct" block.
So, a different approach is the -qinfo=all (and divert output to nohup.out!)
source='test-http-auth.c' object='test-http-auth.o' libtool=no
DEPDIR=.deps depmode=xlc nohup /bin/sh ../../depcomp xlc_r -E
-DHAVE_CONFIG_H -I. -I../.. -I../../src/lib -I../../src/lib-test
-I../../src/lib-dns -I../../src/lib-ssl-iostream -I../../src/lib-master
-I/opt/include -I/opt/buildaix/include -I/opt/include -O2 -qmaxmem=-1
-qarch=pwr5 -I/opt/buildaix/includes -c -o test-http-auth.o
test-http-auth.c >test-http-auth.info
"test-http-auth.c", line 26.31: 1506-221 (I) Initializer must be a valid constant expression. "test-http-auth.c", line 26.31: 1506-444 (I) The opening brace is redundant. "test-http-auth.c", line 27.25: 1506-444 (I) The opening brace is redundant. "test-http-auth.c", line 27.27: 1506-022 (S) "scheme" is not a member of "const struct http_auth_challenges_test". "test-http-auth.c", line 27.37: 1506-196 (W) Initialization between types "struct http_auth_challenge_test* const" and "char*" is not allowed. "test-http-auth.c", line 28.33: 1506-022 (S) "data" is not a member of "const struct http_auth_challenges_test". "test-http-auth.c", line 28.41: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 29.33: 1506-022 (S) "params" is not a member of "const struct http_auth_challenges_test". "test-http-auth.c", line 29.43: 1506-221 (I) Initializer must be a valid constant expression. "test-http-auth.c", line 29.43: 1506-444 (I) The opening brace is redundant. "test-http-auth.c", line 30.41: 1506-444 (I) The opening brace is redundant. "test-http-auth.c", line 30.43: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 30.52: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 30.65: 1506-445 (I) The closing brace is redundant. "test-http-auth.c", line 30.68: 1506-444 (I) The opening brace is redundant. "test-http-auth.c", line 30.70: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 30.76: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 30.81: 1506-445 (I) The closing brace is redundant. "test-http-auth.c", line 31.33: 1506-445 (I) The closing brace is redundant. "test-http-auth.c", line 32.25: 1506-445 (I) The closing brace is redundant. "test-http-auth.c", line 32.27: 1506-444 (I) The opening brace is redundant. "test-http-auth.c", line 33.33: 1506-022 (S) "scheme" is not a member of "const struct http_auth_challenges_test". "test-http-auth.c", line 33.43: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 34.25: 1506-445 (I) The closing brace is redundant. "test-http-auth.c", line 35.17: 1506-445 (I) The closing brace is redundant. "test-http-auth.c", line 38.18: 1506-467 (I) String literals concatenated. "test-http-auth.c", line 39.18: 1506-467 (I) String literals concatenated. "test-http-auth.c", line 40.18: 1506-467 (I) String literals concatenated. "test-http-auth.c", line 41.18: 1506-467 (I) String literals concatenated. "test-http-auth.c", line 42.31: 1506-221 (I) Initializer must be a valid constant expression. "test-http-auth.c", line 42.31: 1506-444 (I) The opening brace is redundant. "test-http-auth.c", line 43.25: 1506-444 (I) The opening brace is redundant. "test-http-auth.c", line 43.27: 1506-022 (S) "scheme" is not a member of "const struct http_auth_challenges_test". "test-http-auth.c", line 43.37: 1506-196 (W) Initialization between types "struct http_auth_challenge_test* const" and "char*" is not allowed. "test-http-auth.c", line 44.33: 1506-022 (S) "data" is not a member of "const struct http_auth_challenges_test". "test-http-auth.c", line 44.41: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 45.33: 1506-022 (S) "params" is not a member of "const struct http_auth_challenges_test". "test-http-auth.c", line 45.43: 1506-221 (I) Initializer must be a valid constant expression. "test-http-auth.c", line 45.43: 1506-444 (I) The opening brace is redundant. "test-http-auth.c", line 46.41: 1506-444 (I) The opening brace is redundant. "test-http-auth.c", line 46.43: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 46.52: 1506-026 (S) Number of initializers cannot be greater than the number of aggregate members. "test-http-auth.c", line 46.73: 1506-445 (I) The closing brace is redundant. "test-http-auth.c", line 47.41: 1506-444 (I) The opening brace is redundant.
I can send the complete .i and .info files if you need more info to understand what is happening.
Michael