mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-24 06:12:27 +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
|
@ -68,7 +68,6 @@ TEST(pthread_cancel, self_deferred_waitsForCancellationPoint) {
|
|||
}
|
||||
|
||||
void *Worker(void *arg) {
|
||||
int n;
|
||||
char buf[8];
|
||||
pthread_cleanup_push(OnCleanup, 0);
|
||||
read(pfds[0], buf, sizeof(buf));
|
||||
|
@ -224,8 +223,10 @@ void *CpuBoundWorker(void *arg) {
|
|||
CheckStackIsAligned();
|
||||
wouldleak = malloc(123);
|
||||
wontleak1 = malloc(123);
|
||||
(void)wontleak1;
|
||||
pthread_cleanup_push(free, wontleak1);
|
||||
wontleak2 = _gc(malloc(123));
|
||||
(void)wontleak2;
|
||||
ASSERT_EQ(0, pthread_setspecific(key, (void *)31337));
|
||||
ASSERT_EQ(0, pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0));
|
||||
#ifdef __x86_64__
|
||||
|
@ -262,7 +263,6 @@ TEST(pthread_cancel, async) {
|
|||
}
|
||||
|
||||
void *CancelSelfWorkerAsync(void *arg) {
|
||||
char buf[8];
|
||||
pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, 0);
|
||||
pthread_cleanup_push(OnCleanup, 0);
|
||||
pthread_cancel(pthread_self());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue