Skip to content

Commit 9fdc4f9

Browse files
committed
Fix a small number of -Wmissing-prototypes compiler warnings in sincos().
- Add missing prototypes to openlibm.h for sincos() and sincosf(). - Mark the internal kernel functions static.
1 parent 4217787 commit 9fdc4f9

3 files changed

Lines changed: 17 additions & 2 deletions

File tree

src/openlibm.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,11 @@ int isnanf(float) __pure2;
315315
double gamma_r(double, int *);
316316
double lgamma_r(double, int *);
317317

318+
/*
319+
* Single sine/cosine function.
320+
*/
321+
void sincos(double, double *, double *);
322+
318323
/*
319324
* IEEE Test Vector
320325
*/
@@ -411,6 +416,11 @@ float ynf(int, float);
411416
float gammaf_r(float, int *);
412417
float lgammaf_r(float, int *);
413418

419+
/*
420+
* Single sine/cosine function.
421+
*/
422+
void sincosf(float, float *, float *);
423+
414424
/*
415425
* float version of IEEE Test Vector
416426
*/
@@ -485,6 +495,11 @@ long double truncl(long double);
485495
/* Reentrant version of lgammal. */
486496
#if __BSD_VISIBLE
487497
long double lgammal_r(long double, int *);
498+
499+
/*
500+
* Single sine/cosine function.
501+
*/
502+
void sincosl(long double, long double *, long double *);
488503
#endif /* __BSD_VISIBLE */
489504

490505
#if defined(__cplusplus)

src/s_sincos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ C4 = -2.75573143513906633035e-07, /* 0xBE927E4F, 0x809C52AD */
5858
C5 = 2.08757232129817482790e-09, /* 0x3E21EE9E, 0xBDB4B1C4 */
5959
C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */
6060

61-
DLLEXPORT void
61+
static void
6262
__kernel_sincos( double x, double y, int iy, double * k_s, double * k_c )
6363
{
6464
/* Inline calculation of sin/cos, as we can save

src/s_sincosf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ C1 = 0x155553e1053a42.0p-57, /* 0.0416666233237390631894 */
4141
C2 = -0x16c087e80f1e27.0p-62, /* -0.00138867637746099294692 */
4242
C3 = 0x199342e0ee5069.0p-68; /* 0.0000243904487962774090654 */
4343

44-
DLLEXPORT void
44+
static void
4545
__kernel_sincosdf( double x, float * s, float * c )
4646
{
4747
double r, w, z, v;

0 commit comments

Comments
 (0)