Fix a large pile of solaris warnings for bug 19767.

In nearly all cases, this is a matter of making sure that we include
orconfig.h before we include any standard c headers.
This commit is contained in:
Nick Mathewson 2016-07-28 10:47:46 -04:00
parent c1bfa65211
commit 94bff894f9
12 changed files with 20 additions and 8 deletions

View file

@ -1595,6 +1595,7 @@ get_interface_addresses_raw,(int severity, sa_family_t family))
return result; return result;
#endif #endif
(void) severity; (void) severity;
(void) result;
return NULL; return NULL;
} }

View file

@ -13,6 +13,8 @@
#ifndef TOR_CRYPTO_H #ifndef TOR_CRYPTO_H
#define TOR_CRYPTO_H #define TOR_CRYPTO_H
#include "orconfig.h"
#include <stdio.h> #include <stdio.h>
#include "torint.h" #include "torint.h"
#include "testsupport.h" #include "testsupport.h"

View file

@ -4548,13 +4548,13 @@ tor_get_exit_code(process_handle_t *process_handle,
return PROCESS_EXIT_RUNNING; return PROCESS_EXIT_RUNNING;
} else if (retval != process_handle->pid) { } else if (retval != process_handle->pid) {
log_warn(LD_GENERAL, "waitpid() failed for PID %d: %s", log_warn(LD_GENERAL, "waitpid() failed for PID %d: %s",
process_handle->pid, strerror(errno)); (int)process_handle->pid, strerror(errno));
return PROCESS_EXIT_ERROR; return PROCESS_EXIT_ERROR;
} }
if (!WIFEXITED(stat_loc)) { if (!WIFEXITED(stat_loc)) {
log_warn(LD_GENERAL, "Process %d did not exit normally", log_warn(LD_GENERAL, "Process %d did not exit normally",
process_handle->pid); (int)process_handle->pid);
return PROCESS_EXIT_ERROR; return PROCESS_EXIT_ERROR;
} }

View file

@ -34,7 +34,7 @@
#define ED25519_FN2(fn,suffix) ED25519_FN3(fn,suffix) #define ED25519_FN2(fn,suffix) ED25519_FN3(fn,suffix)
#define ED25519_FN(fn) ED25519_FN2(fn,ED25519_SUFFIX) #define ED25519_FN(fn) ED25519_FN2(fn,ED25519_SUFFIX)
#include "orconfig.h"
#include "ed25519-donna.h" #include "ed25519-donna.h"
#include "ed25519_donna_tor.h" #include "ed25519_donna_tor.h"
#include "ed25519-randombytes.h" #include "ed25519-randombytes.h"

View file

@ -1,6 +1,7 @@
/* Modified for Tor: new API, 64-byte secret keys. */ /* Modified for Tor: new API, 64-byte secret keys. */
#include <string.h>
#include "randombytes.h" #include "randombytes.h"
#include <string.h>
#include "crypto_sign.h" #include "crypto_sign.h"
#include "crypto_hash_sha512.h" #include "crypto_hash_sha512.h"
#include "ge.h" #include "ge.h"

View file

@ -1,6 +1,7 @@
/* (Modified by Tor to verify signature separately from message) */ /* (Modified by Tor to verify signature separately from message) */
#include <string.h>
#include "crypto_sign.h" #include "crypto_sign.h"
#include <string.h>
#include "crypto_hash_sha512.h" #include "crypto_hash_sha512.h"
#include "crypto_verify_32.h" #include "crypto_verify_32.h"
#include "ge.h" #include "ge.h"

View file

@ -8,6 +8,8 @@
#define TOR_CIRCUITMUX_EWMA_C_ #define TOR_CIRCUITMUX_EWMA_C_
#include "orconfig.h"
#include <math.h> #include <math.h>
#include "or.h" #include "or.h"

View file

@ -1,8 +1,8 @@
/* Copyright (c) 2011-2016, The Tor Project, Inc. */ /* Copyright (c) 2011-2016, The Tor Project, Inc. */
/* See LICENSE for licensing information */ /* See LICENSE for licensing information */
#include <stdio.h>
#include "orconfig.h" #include "orconfig.h"
#include <stdio.h>
#ifdef _WIN32 #ifdef _WIN32
#define WINDOWS_LEAN_AND_MEAN #define WINDOWS_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>

View file

@ -1,3 +1,4 @@
#include "orconfig.h"
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <sys/types.h> #include <sys/types.h>

View file

@ -1,6 +1,8 @@
/* Copyright (c) 2014-2016, The Tor Project, Inc. */ /* Copyright (c) 2014-2016, The Tor Project, Inc. */
/* See LICENSE for licensing information */ /* See LICENSE for licensing information */
#include "orconfig.h"
#include <math.h> #include <math.h>
#define TOR_CHANNEL_INTERNAL_ #define TOR_CHANNEL_INTERNAL_

View file

@ -1,10 +1,10 @@
/* Copyright (c) 2014-2016, The Tor Project, Inc. */ /* Copyright (c) 2014-2016, The Tor Project, Inc. */
/* See LICENSE for licensing information */ /* See LICENSE for licensing information */
#include <math.h>
#include "orconfig.h" #include "orconfig.h"
#include <math.h>
/* Libevent stuff */ /* Libevent stuff */
#ifdef HAVE_EVENT2_EVENT_H #ifdef HAVE_EVENT2_EVENT_H
#include <event2/event.h> #include <event2/event.h>

View file

@ -3,6 +3,8 @@
#define LOG_PRIVATE #define LOG_PRIVATE
#define REPHIST_PRIVATE #define REPHIST_PRIVATE
#include "orconfig.h"
#include <float.h> #include <float.h>
#include <math.h> #include <math.h>