History

Fix warning detected by clang when passing unsigned int pointer when signed is expected. Instead of a cast, it would be better to pass the exact type.

Christian Jullien committed 6 years ago

Commit 383acf81 parent 50abaae1 file · +5 −5Browse files

Unified · Split

arm64-gen.c+5−5
@@ -1080,7 +1080,7 @@ ST_FUNC void gfunc_call(int nb_args) · 1079 unmodified lines
10801080 else if (a[i] < 32) {
10811081 // value in floating-point registers
10821082 if ((vtop->type.t & VT_BTYPE) == VT_STRUCT) {
1083− uint32_t j, sz, n = arm64_hfa(&vtop->type, &sz);
1083+ uint32_t j, sz, n = arm64_hfa(&vtop->type, (int *)&sz);
10841084 vtop->type.t = VT_PTR;
10851085 gaddrof();
10861086 gv(RC_R30);
@@ -1129,7 +1129,7 @@ ST_FUNC void gfunc_call(int nb_args) · 42 unmodified lines
11291129
11301130 }
11311131 else if (a[0] == 16) {
1132− uint32_t j, sz, n = arm64_hfa(return_type, &sz);
1132+ uint32_t j, sz, n = arm64_hfa(return_type, (int *)&sz);
11331133 for (j = 0; j < n; j++)
11341134 o(0x3d000100 |
11351135 (sz & 16) << 19 | -(sz & 8) << 27 | (sz & 4) << 29 |
@@ -1205,7 +1205,7 @@ ST_FUNC void gfunc_prolog(Sym *func_sym) · 69 unmodified lines
12051205
12061206 // HFAs of float and double need to be written differently:
12071207 if (16 <= a[i] && a[i] < 32 && (sym->type.t & VT_BTYPE) == VT_STRUCT) {
1208− uint32_t j, sz, k = arm64_hfa(&sym->type, &sz);
1208+ uint32_t j, sz, k = arm64_hfa(&sym->type, (int *)&sz);
12091209 if (sz < 16)
12101210 for (j = 0; j < k; j++) {
12111211 o(0x3d0003e0 | -(sz & 8) << 27 | (sz & 4) << 29 |
@@ -1269,7 +1269,7 @@ ST_FUNC void gen_va_start(void) · 57 unmodified lines
12691269 ST_FUNC void gen_va_arg(CType *t)
12701270 {
12711271 int align, size = type_size(t, &align);
1272− int fsize, hfa = arm64_hfa(t, &fsize);
1272+ int fsize, hfa = arm64_hfa(t, (int *)&fsize);
12731273 uint32_t r0, r1;
12741274
12751275 if (is_float(t->t)) {
@@ -1379,7 +1379,7 @@ ST_FUNC void gfunc_return(CType *func_type) · 103 unmodified lines
13791379 }
13801380 case 16:
13811381 if ((func_type->t & VT_BTYPE) == VT_STRUCT) {
1382− uint32_t j, sz, n = arm64_hfa(&vtop->type, &sz);
1382+ uint32_t j, sz, n = arm64_hfa(&vtop->type, (int *)&sz);
13831383 gaddrof();
13841384 gv(RC_R(0));
13851385 for (j = 0; j < n; j++)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t