summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Dave MacLachlan2021-11-06 23:23:56 -0700
committerGravatar Nikias Bassen2022-09-05 01:27:17 +0200
commiteeb22f94307a2c3f5f54275deb8d270b683df216 (patch)
treea64c5fd689479d4263ca5f4665976a41d5f7e761 /src
parente00615023c2108ba457a9089b900b14bbc9bb73b (diff)
downloadlibplist-eeb22f94307a2c3f5f54275deb8d270b683df216.tar.gz
libplist-eeb22f94307a2c3f5f54275deb8d270b683df216.tar.bz2
Fix up warning with `-Wbad-function-cast`
Diffstat (limited to 'src')
-rw-r--r--src/plist.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plist.c b/src/plist.c
index 78e71da..37edfa4 100644
--- a/src/plist.c
+++ b/src/plist.c
@@ -1046,7 +1046,10 @@ PLIST_API void plist_get_date_val(plist_t node, int32_t * sec, int32_t * usec)
if (sec)
*sec = (int32_t)val;
if (usec)
- *usec = (int32_t)fabs((val - (int64_t)val) * 1000000);
+ {
+ val = fabs((val - (int64_t)val) * 1000000);
+ *usec = (int32_t)val;
+ }
}
int plist_data_compare(const void *a, const void *b)