We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4201

Summary: libm: Mismatch types for __ieee754_rem_pio2 and __kernel_rem_pio2
Product: SDL Reporter: exjam <james.benton2>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.1   
Hardware: All   
OS: All   

Description exjam 2018-06-15 08:54:02 UTC
In src/libm/e_rem_pio2.c the function __ieee754_rem_pio2 is defined with a return type of int32_t, yet in src/libm/math_private.h it is declared with a return type of int.

In src/libm/k_rem_pio2.c the function __kernel_rem_pio2 is defined with the last argument as const int32_t *ipio2, yet in src/libm/math_private.h it is declared with the type int.

An example fix might be to update the declarations to match the definitions:

src/libm/math_private.h
-     extern int __ieee754_rem_pio2(double, double *) attribute_hidden;
+     extern int32_t __ieee754_rem_pio2(double, double *) attribute_hidden;

      extern int __kernel_rem_pio2(double *, double *, int, int, int,
-                                  const int *) attribute_hidden;
+                                  const int32_t *) attribute_hidden;
Comment 1 Ryan C. Gordon 2018-08-03 21:22:08 UTC
Fixed in https://hg.libsdl.org/SDL/rev/ce88faaf8bd2, thanks!

--ryan.