From: Dmitry Volyntsev Date: Fri, 3 Apr 2020 16:06:55 +0000 (+0000) Subject: Fixed building unit tests by SunC 5.15. X-Git-Tag: 0.4.0~15 X-Git-Url: http://www.kaiwu.me/postgresql/commit/?a=commitdiff_plain;h=ae11dc81cb620de826c573b0cf29862863278aae;p=njs.git Fixed building unit tests by SunC 5.15. Fixed warning "initializer will be sign-extended". --- diff --git a/src/test/njs_externals_test.c b/src/test/njs_externals_test.c index fb2fcffb..85d8144e 100644 --- a/src/test/njs_externals_test.c +++ b/src/test/njs_externals_test.c @@ -614,8 +614,8 @@ static njs_unit_test_req_init_t njs_test_requests[] = { { njs_str("$shared"), { .uri = njs_str("shared"), - .a = -1, - .d = -2, + .a = 11, + .d = 13, }, { { njs_string("r"), njs_string("rval") }, diff --git a/src/test/njs_unit_test.c b/src/test/njs_unit_test.c index 825c332e..526ea84a 100644 --- a/src/test/njs_unit_test.c +++ b/src/test/njs_unit_test.c @@ -16845,11 +16845,11 @@ static njs_unit_test_t njs_shared_test[] = njs_str("{a:'1',b:42,c:{d:1024}}") }, { njs_str("njs.dump($shared.props)"), - njs_str("{a:'4294967295',b:42,c:{d:4294967294}}") }, + njs_str("{a:'11',b:42,c:{d:13}}") }, { njs_str("var r = JSON.parse(JSON.stringify($shared));" "[r.uri, r.host, r.props.a, njs.dump(r.vars), njs.dump(r.consts), r.header['02']]"), - njs_str("shared,АБВГДЕЁЖЗИЙ,4294967295,{},{},02|АБВ") }, + njs_str("shared,АБВГДЕЁЖЗИЙ,11,{},{},02|АБВ") }, { njs_str("$shared.toString()"), njs_str("[object External]") }, @@ -16864,7 +16864,7 @@ static njs_unit_test_t njs_shared_test[] = njs_str("1") }, { njs_str("$shared.method = function() {return this.props.a;}; $shared.method()"), - njs_str("4294967295") }, + njs_str("11") }, { njs_str("var r; for (var i = 0; i < 2**10; i++) {r = $r.create('XXX').uri;}"), njs_str("undefined") },