mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-23 19:10:30 +00:00
Fix warnings
This change fixes Cosmopolitan so it has fewer opinions about compiler warnings. The whole repository had to be cleaned up to be buildable in -Werror -Wall mode. This lets us benefit from things like strict const checking. Some actual bugs might have been caught too.
This commit is contained in:
parent
e2b3c3618e
commit
0d748ad58e
571 changed files with 1306 additions and 1888 deletions
3
third_party/gdtoa/gdtoa_fltrnds.inc
vendored
3
third_party/gdtoa/gdtoa_fltrnds.inc
vendored
|
@ -1,7 +1,8 @@
|
|||
/* clang-format off */
|
||||
|
||||
FPI *fpi, fpi1;
|
||||
FPI fpi1;
|
||||
int Rounding;
|
||||
const FPI *fpi;
|
||||
Rounding = FLT_ROUNDS;
|
||||
fpi = &fpi0;
|
||||
if (Rounding != FPI_Round_near) {
|
||||
|
|
1
third_party/gdtoa/misc.c
vendored
1
third_party/gdtoa/misc.c
vendored
|
@ -128,7 +128,6 @@ __gdtoa_Balloc(int k, ThInfo **PTI)
|
|||
{
|
||||
int x;
|
||||
Bigint *rv;
|
||||
unsigned int len;
|
||||
ThInfo *TI;
|
||||
if (!(TI = *PTI))
|
||||
*PTI = TI = __gdtoa_get_TI();
|
||||
|
|
3
third_party/gdtoa/strtord.c
vendored
3
third_party/gdtoa/strtord.c
vendored
|
@ -67,7 +67,8 @@ int
|
|||
strtord(const char *s, char **sp, int rounding, double *d)
|
||||
{
|
||||
static const FPI fpi0 = { 53, 1-1023-53+1, 2046-1023-53+1, 1, SI, 0 /*unused*/ };
|
||||
FPI *fpi, fpi1;
|
||||
FPI fpi1;
|
||||
const FPI *fpi;
|
||||
ULong bits[2];
|
||||
Long exp;
|
||||
int k;
|
||||
|
|
3
third_party/gdtoa/strtordd.c
vendored
3
third_party/gdtoa/strtordd.c
vendored
|
@ -165,7 +165,8 @@ int
|
|||
strtordd(const char *s, char **sp, int rounding, double *dd)
|
||||
{
|
||||
static const FPI fpi0 = { 106, 1-1023-53+1, 2046-1023-106+1, 1, 0, 0 /*unused*/ };
|
||||
FPI *fpi, fpi1;
|
||||
FPI fpi1;
|
||||
const FPI *fpi;
|
||||
ULong bits[4];
|
||||
Long exp;
|
||||
int k;
|
||||
|
|
3
third_party/gdtoa/strtorf.c
vendored
3
third_party/gdtoa/strtorf.c
vendored
|
@ -63,7 +63,8 @@ int
|
|||
strtorf(const char *s, char **sp, int rounding, float *f)
|
||||
{
|
||||
static const FPI fpi0 = { 24, 1-127-24+1, 254-127-24+1, 1, SI, 0 /*unused*/ };
|
||||
FPI *fpi, fpi1;
|
||||
FPI fpi1;
|
||||
const FPI *fpi;
|
||||
ULong bits[1];
|
||||
Long exp;
|
||||
int k;
|
||||
|
|
3
third_party/gdtoa/strtorx.c
vendored
3
third_party/gdtoa/strtorx.c
vendored
|
@ -74,7 +74,8 @@ int
|
|||
strtorx(const char *s, char **sp, int rounding, void *L)
|
||||
{
|
||||
static const FPI fpi0 = { 64, 1-16383-64+1, 32766 - 16383 - 64 + 1, 1, SI, 0 /*unused*/ };
|
||||
FPI *fpi, fpi1;
|
||||
FPI fpi1;
|
||||
const FPI *fpi;
|
||||
ULong bits[2];
|
||||
Long exp;
|
||||
int k;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue