summaryrefslogtreecommitdiff
path: root/usr/src/lib/libshell/common/sh/streval.c
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2018-11-27 11:40:19 +0200
committerToomas Soome <tsoome@me.com>2020-01-13 19:42:07 +0200
commit2cac0f114247a29fba32510c4c0ea549c8c0a7c9 (patch)
tree7ac4fb1857e3f10672d272507569ac37e87cb3aa /usr/src/lib/libshell/common/sh/streval.c
parent8bbe90c14cec0e58886bcb1d4d11723245046f36 (diff)
downloadillumos-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/libshell/common/sh/streval.c')
-rw-r--r--usr/src/lib/libshell/common/sh/streval.c4
1 files changed, 2 insertions, 2 deletions
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;