summaryrefslogtreecommitdiffhomepage
path: root/value.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2021-04-27 00:35:20 +0200
committerJo-Philipp Wich <jo@mein.io>2021-04-27 12:18:32 +0200
commit64eec7f90e945696572ee076b75d1f35e8f2248a (patch)
treef61121e8f89e39787a960e621fc8492e57fc4bc0 /value.c
parent4af803d76e4c08ff5661c2b37dbd333f3aba866d (diff)
treewide: ISO C / pedantic compliance
- Shuffle typedefs to avoid need for non-compliant forward declarations - Fix non-compliant empty struct initializers - Remove use of braced expressions - Remove use of anonymous unions - Avoid `void *` pointer arithmetic - Fix several warnings reported by gcc -pedantic mode and clang 11 compilation Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'value.c')
-rw-r--r--value.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/value.c b/value.c
index e53e317..0827038 100644
--- a/value.c
+++ b/value.c
@@ -260,7 +260,7 @@ uc_cmp(int how, uc_value_t *v1, uc_value_t *v2)
}
else {
if (t1 == t2 && !ucv_is_scalar(v1)) {
- delta = (void *)v1 - (void *)v2;
+ delta = (intptr_t)v1 - (intptr_t)v2;
}
else {
t1 = uc_cast_number(v1, &n1, &d1);