mirror of https://github.com/flysand7/ciabatta.git
Compile with max warnings
This commit is contained in:
parent
febe307f89
commit
ca63470cc9
2
bake.cmd
2
bake.cmd
|
@ -1,4 +1,4 @@
|
|||
|
||||
nasm src\_win\chkstk.asm -ochkstk.o -fwin64
|
||||
clang src\ciabatta.c -o ciabatta.obj -c -DCIABATTA_WIN -I inc -I src\_win -nodefaultlibs -g -mfma
|
||||
clang -Wall src\ciabatta.c -o ciabatta.obj -c -DCIABATTA_WIN -I inc -I src\_win -nodefaultlibs -g -mfma
|
||||
lib /nologo /out:ciabatta.lib chkstk.o ciabatta.obj src\fdec64\fdec64.lib src\unicope\unicope.lib
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <types/size.h>
|
||||
|
||||
#define __bool_true_false_are_defined 1
|
||||
#define __alignas_is_defined 1
|
||||
#define __alignof_is_defined 1
|
||||
|
@ -8,12 +10,6 @@
|
|||
#define NULL ((void *)0)
|
||||
#define offsetof(st, m) ((size_t)((char *)&((st *)0)->m - (char *)0))
|
||||
|
||||
#if defined(_WIN32)
|
||||
typedef unsigned long size_t;
|
||||
#else
|
||||
typedef unsigned long long size_t;
|
||||
#endif
|
||||
|
||||
typedef long long ptrdiff_t;
|
||||
typedef long long max_align_t;
|
||||
typedef unsigned short wchar_t; //
|
||||
|
|
|
@ -164,26 +164,6 @@ int _wcsicmp(wchar_t const* s1, wchar_t const* s2) {
|
|||
return diff;
|
||||
}
|
||||
|
||||
static size_t count_wide_chars(const wchar_t* str) {
|
||||
size_t len = 0;
|
||||
while (str[len] != 0) len++;
|
||||
return len;
|
||||
}
|
||||
|
||||
static bool wchar_to_ansi(char* out, const wchar_t* str, size_t len) {
|
||||
for (size_t i = 0; i < len; i++) {
|
||||
wchar_t ch = *str++;
|
||||
if (ch < 0 || ch > 0x7F) {
|
||||
*out++ = 0;
|
||||
return false;
|
||||
}
|
||||
*out++ = ch;
|
||||
}
|
||||
|
||||
*out++ = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
static int cmdline_to_argv8(const wchar_t *cmd, char **argv);
|
||||
|
||||
static char **get_command_args(int *argc_ptr) {
|
||||
|
|
|
@ -413,7 +413,7 @@ int ungetc(int c, FILE *stream) {
|
|||
}
|
||||
cum:
|
||||
mtx_unlock(&stream->lock);
|
||||
return 0;
|
||||
return res;
|
||||
}
|
||||
|
||||
int fgetpos(FILE *restrict stream, fpos_t *restrict pos) {
|
||||
|
|
|
@ -263,7 +263,7 @@ static int pfx(vprintfcb)(
|
|||
double value;
|
||||
} _ = {.value = value};
|
||||
uint64_t bits = _.bits;
|
||||
uint64_t neg = bits >> 63;
|
||||
// uint64_t neg = bits >> 63;
|
||||
int64_t e2 = (int64_t)((bits >> 52) & ((1<<11)-1));
|
||||
int64_t m2 = bits & ((UINT64_C(1)<<52)-1);
|
||||
if(class == FP_ZERO) {
|
||||
|
@ -352,7 +352,7 @@ static int pfx(vprintfcb)(
|
|||
out(' ');
|
||||
}
|
||||
// Print string
|
||||
mbstate_t ps = {0};
|
||||
//mbstate_t ps = {0};
|
||||
for(int i = 0; i < len; ++i) {
|
||||
out(str[i]);
|
||||
}
|
||||
|
@ -547,7 +547,7 @@ static inline int pfx(_dtoh)(
|
|||
double value;
|
||||
} _ = {.value = value};
|
||||
uint64_t bits = _.bits;
|
||||
uint64_t neg = bits >> 63;
|
||||
// uint64_t neg = bits >> 63;
|
||||
int64_t exp = (int64_t)((bits >> 52) & 0x7ff) - 1023;
|
||||
int64_t mant = bits & ((UINT64_C(1)<<51)-1);
|
||||
if(class == FP_SUBNORMAL || class == FP_ZERO) {
|
||||
|
@ -555,7 +555,6 @@ static inline int pfx(_dtoh)(
|
|||
}
|
||||
// Figure out how many hex digits does mantissa take up (mant_digits_n)
|
||||
// and the number of digits after decimal point (prec)
|
||||
static ctype mant_buf[64] = {0};
|
||||
int mant_digits_n;
|
||||
int nonsig_digits_n = 0;
|
||||
if(mant != 0) {
|
||||
|
@ -690,7 +689,7 @@ static inline int pfx(_dtoa)(
|
|||
double value;
|
||||
} _ = {.value = value};
|
||||
uint64_t bits = _.bits;
|
||||
uint64_t neg = bits >> 63;
|
||||
//uint64_t neg = bits >> 63;
|
||||
int64_t e2 = (int64_t)((bits >> 52) & ((1<<11)-1));
|
||||
int64_t m2 = bits & ((UINT64_C(1)<<52)-1);
|
||||
if(class == FP_ZERO) {
|
||||
|
@ -816,7 +815,6 @@ static inline int pfx(_etoa)(
|
|||
double value;
|
||||
} _ = {.value = value};
|
||||
uint64_t bits = _.bits;
|
||||
uint64_t neg = bits >> 63;
|
||||
int64_t e2 = (int64_t)((bits >> 52) & ((1<<11)-1));
|
||||
int64_t m2 = bits & ((UINT64_C(1)<<52)-1);
|
||||
if(class == FP_ZERO) {
|
||||
|
|
Loading…
Reference in New Issue