mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 15:28: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
|
@ -230,15 +230,12 @@ bool Send(int tmpfd, const void *output, size_t outputsize) {
|
|||
bool SendRequest(int tmpfd) {
|
||||
int fd;
|
||||
char *p;
|
||||
size_t i;
|
||||
bool okall;
|
||||
ssize_t rc;
|
||||
uint32_t crc;
|
||||
struct stat st;
|
||||
const char *name;
|
||||
unsigned char *hdr, *q;
|
||||
size_t progsize, namesize, hdrsize;
|
||||
unsigned have;
|
||||
CHECK_NE(-1, (fd = open(g_prog, O_RDONLY)));
|
||||
CHECK_NE(-1, fstat(fd, &st));
|
||||
CHECK_NE(MAP_FAILED, (p = mmap(0, st.st_size, PROT_READ, MAP_SHARED, fd, 0)));
|
||||
|
@ -302,8 +299,7 @@ bool Recv(unsigned char *p, size_t n) {
|
|||
|
||||
int ReadResponse(void) {
|
||||
int res;
|
||||
ssize_t rc;
|
||||
size_t n, m;
|
||||
size_t n;
|
||||
uint32_t size;
|
||||
unsigned char b[512];
|
||||
for (res = -1; res == -1;) {
|
||||
|
@ -378,7 +374,7 @@ bool ShouldRunInParallel(void) {
|
|||
int SpawnSubprocesses(int argc, char *argv[]) {
|
||||
const char *tpath;
|
||||
sigset_t chldmask, savemask;
|
||||
int i, rc, ws, pid, tmpfd, *pids, exitcode;
|
||||
int i, ws, pid, tmpfd, *pids, exitcode;
|
||||
struct sigaction ignore, saveint, savequit;
|
||||
char *args[5] = {argv[0], argv[1], argv[2]};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue