diff options
author | Toomas Soome <tsoome@me.com> | 2018-11-27 11:40:19 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2020-01-13 19:42:07 +0200 |
commit | 2cac0f114247a29fba32510c4c0ea549c8c0a7c9 (patch) | |
tree | 7ac4fb1857e3f10672d272507569ac37e87cb3aa /usr/src/lib | |
parent | 8bbe90c14cec0e58886bcb1d4d11723245046f36 (diff) | |
download | illumos-gate-2cac0f114247a29fba32510c4c0ea549c8c0a7c9.tar.gz |
12106 libshell: cast between incompatible function types
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: Robert Mustacchi <rm@fingolfin.org>
Diffstat (limited to 'usr/src/lib')
-rw-r--r-- | usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math | 34 | ||||
-rw-r--r-- | usr/src/lib/libshell/common/sh/streval.c | 4 | ||||
-rw-r--r-- | usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math | 34 |
3 files changed, 36 insertions, 36 deletions
diff --git a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math index 91c42367be..c6ec7ce3d6 100644 --- a/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math +++ b/usr/src/lib/libshell/amd64/src/cmd/ksh93/FEATURE/math @@ -130,28 +130,28 @@ const struct mathtab shtab_math[] = "\002fmax", (Math_f)fmaxl, "\002fmin", (Math_f)fminl, "\002fmod", (Math_f)fmodl, - "\011fpclassify", (Math_f)local_fpclassify, + "\011fpclassify", (Math_f)(uintptr_t)local_fpclassify, "\002hypot", (Math_f)hypotl, - "\011ilogb", (Math_f)ilogbl, - "\011isfinite", (Math_f)local_isfinite, - "\012isgreater", (Math_f)local_isgreater, - "\012isgreaterequal", (Math_f)local_isgreaterequal, - "\011isinf", (Math_f)local_isinf, - "\012isless", (Math_f)local_isless, - "\012islessequal", (Math_f)local_islessequal, - "\012islessgreater", (Math_f)local_islessgreater, - "\011isnan", (Math_f)isnanl, - "\011isnormal", (Math_f)local_isnormal, + "\011ilogb", (Math_f)(uintptr_t)ilogbl, + "\011isfinite", (Math_f)(uintptr_t)local_isfinite, + "\012isgreater", (Math_f)(uintptr_t)local_isgreater, + "\012isgreaterequal", (Math_f)(uintptr_t)local_isgreaterequal, + "\011isinf", (Math_f)(uintptr_t)local_isinf, + "\012isless", (Math_f)(uintptr_t)local_isless, + "\012islessequal", (Math_f)(uintptr_t)local_islessequal, + "\012islessgreater", (Math_f)(uintptr_t)local_islessgreater, + "\011isnan", (Math_f)(uintptr_t)isnanl, + "\011isnormal", (Math_f)(uintptr_t)local_isnormal, #ifdef FP_SUBNORMAL - "\011issubnormal", (Math_f)local_issubnormal, + "\011issubnormal", (Math_f)(uintptr_t)local_issubnormal, #endif - "\012isunordered", (Math_f)local_isunordered, + "\012isunordered", (Math_f)(uintptr_t)local_isunordered, #ifdef FP_ZERO - "\011iszero", (Math_f)local_iszero, + "\011iszero", (Math_f)(uintptr_t)local_iszero, #endif "\001j0", (Math_f)j0l, "\001j1", (Math_f)j1l, - "\002jn", (Math_f)jnl, + "\002jn", (Math_f)(uintptr_t)jnl, "\001lgamma", (Math_f)lgammal, "\001log", (Math_f)logl, "\001log10", (Math_f)log10l, @@ -167,7 +167,7 @@ const struct mathtab shtab_math[] = "\001round", (Math_f)roundl, "\002scalb", (Math_f)scalbl, "\002scalbn", (Math_f)scalbnl, - "\011signbit", (Math_f)local_signbit, + "\011signbit", (Math_f)(uintptr_t)local_signbit, "\001sin", (Math_f)sinl, "\001sinh", (Math_f)sinhl, "\001sqrt", (Math_f)sqrtl, @@ -177,7 +177,7 @@ const struct mathtab shtab_math[] = "\001trunc", (Math_f)truncl, "\001y0", (Math_f)y0l, "\001y1", (Math_f)y1l, - "\002yn", (Math_f)ynl, + "\002yn", (Math_f)(uintptr_t)ynl, "", (Math_f)0 }; #endif diff --git a/usr/src/lib/libshell/common/sh/streval.c b/usr/src/lib/libshell/common/sh/streval.c index 2b7a677f68..11df8402e8 100644 --- a/usr/src/lib/libshell/common/sh/streval.c +++ b/usr/src/lib/libshell/common/sh/streval.c @@ -391,7 +391,7 @@ Sfdouble_t arith_exec(Arith_t *ep) sp--,tp--; fun = *((Math_f*)(ep->code+(int)(*sp))); type = *tp; - num = (*((Math_1i_f)fun))(num); + num = (*((Math_1i_f)(uintptr_t)fun))(num); break; case A_CALL2F: sp-=2,tp-=2; @@ -403,7 +403,7 @@ Sfdouble_t arith_exec(Arith_t *ep) sp-=2,tp-=2; fun = *((Math_f*)(ep->code+(int)(*sp))); type = *tp; - num = (*((Math_2i_f)fun))(sp[1],num); + num = (*((Math_2i_f)(uintptr_t)fun))(sp[1],num); break; case A_CALL3F: sp-=3,tp-=3; diff --git a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math index fbe05f198a..d425e09207 100644 --- a/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math +++ b/usr/src/lib/libshell/i386/src/cmd/ksh93/FEATURE/math @@ -130,28 +130,28 @@ const struct mathtab shtab_math[] = "\002fmax", (Math_f)fmaxl, "\002fmin", (Math_f)fminl, "\002fmod", (Math_f)fmodl, - "\011fpclassify", (Math_f)local_fpclassify, + "\011fpclassify", (Math_f)(uintptr_t)local_fpclassify, "\002hypot", (Math_f)hypotl, - "\011ilogb", (Math_f)ilogbl, - "\011isfinite", (Math_f)local_isfinite, - "\012isgreater", (Math_f)local_isgreater, - "\012isgreaterequal", (Math_f)local_isgreaterequal, - "\011isinf", (Math_f)local_isinf, - "\012isless", (Math_f)local_isless, - "\012islessequal", (Math_f)local_islessequal, - "\012islessgreater", (Math_f)local_islessgreater, - "\011isnan", (Math_f)isnanl, - "\011isnormal", (Math_f)local_isnormal, + "\011ilogb", (Math_f)(uintptr_t)ilogbl, + "\011isfinite", (Math_f)(uintptr_t)local_isfinite, + "\012isgreater", (Math_f)(uintptr_t)local_isgreater, + "\012isgreaterequal", (Math_f)(uintptr_t)local_isgreaterequal, + "\011isinf", (Math_f)(uintptr_t)local_isinf, + "\012isless", (Math_f)(uintptr_t)local_isless, + "\012islessequal", (Math_f)(uintptr_t)local_islessequal, + "\012islessgreater", (Math_f)(uintptr_t)local_islessgreater, + "\011isnan", (Math_f)(uintptr_t)isnanl, + "\011isnormal", (Math_f)(uintptr_t)local_isnormal, #ifdef FP_SUBNORMAL - "\011issubnormal", (Math_f)local_issubnormal, + "\011issubnormal", (Math_f)(uintptr_t)local_issubnormal, #endif - "\012isunordered", (Math_f)local_isunordered, + "\012isunordered", (Math_f)(uintptr_t)local_isunordered, #ifdef FP_ZERO - "\011iszero", (Math_f)local_iszero, + "\011iszero", (Math_f)(uintptr_t)local_iszero, #endif "\001j0", (Math_f)j0l, "\001j1", (Math_f)j1l, - "\002jn", (Math_f)jnl, + "\002jn", (Math_f)(uintptr_t)jnl, "\001lgamma", (Math_f)lgammal, "\001log", (Math_f)logl, "\001log10", (Math_f)log10l, @@ -167,7 +167,7 @@ const struct mathtab shtab_math[] = "\001round", (Math_f)roundl, "\002scalb", (Math_f)scalbl, "\002scalbn", (Math_f)scalbnl, - "\011signbit", (Math_f)local_signbit, + "\011signbit", (Math_f)(uintptr_t)local_signbit, "\001sin", (Math_f)sinl, "\001sinh", (Math_f)sinhl, "\001sqrt", (Math_f)sqrtl, @@ -177,7 +177,7 @@ const struct mathtab shtab_math[] = "\001trunc", (Math_f)truncl, "\001y0", (Math_f)y0l, "\001y1", (Math_f)y1l, - "\002yn", (Math_f)ynl, + "\002yn", (Math_f)(uintptr_t)ynl, "", (Math_f)0 }; #endif |