aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-07-28 10:47:46 -0400
committerNick Mathewson <nickm@torproject.org>2016-07-28 10:47:46 -0400
commit94bff894f9e127888f15ec2333f86d0388e4da7d (patch)
treeaa46d8004f3b51ef99484ac8ade17f78ce418ac3 /src
parentc1bfa65211257e5efb89c5ebc534339d52fa77c4 (diff)
downloadtor-94bff894f9e127888f15ec2333f86d0388e4da7d.tar.gz
tor-94bff894f9e127888f15ec2333f86d0388e4da7d.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/common/address.c1
-rw-r--r--src/common/crypto.h2
-rw-r--r--src/common/util.c4
-rw-r--r--src/ext/ed25519/donna/ed25519_tor.c2
-rw-r--r--src/ext/ed25519/ref10/keypair.c3
-rw-r--r--src/ext/ed25519/ref10/open.c3
-rw-r--r--src/or/circuitmux_ewma.c2
-rw-r--r--src/test/test-child.c2
-rw-r--r--src/test/test-memwipe.c1
-rw-r--r--src/test/test_channeltls.c2
-rw-r--r--src/test/test_scheduler.c4
-rw-r--r--src/test/test_status.c2
12 files changed, 20 insertions, 8 deletions
diff --git a/src/common/address.c b/src/common/address.c
index 793a40effc..c514588d7f 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -1595,6 +1595,7 @@ get_interface_addresses_raw,(int severity, sa_family_t family))
return result;
#endif
(void) severity;
+ (void) result;
return NULL;
}
diff --git a/src/common/crypto.h b/src/common/crypto.h
index 682c4e3253..e4d3d06d13 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -13,6 +13,8 @@
#ifndef TOR_CRYPTO_H
#define TOR_CRYPTO_H
+#include "orconfig.h"
+
#include <stdio.h>
#include "torint.h"
#include "testsupport.h"
diff --git a/src/common/util.c b/src/common/util.c
index f3effe0957..a100f375c3 100644
--- a/src/common/util.c
+++ b/src/common/util.c
@@ -4548,13 +4548,13 @@ tor_get_exit_code(process_handle_t *process_handle,
return PROCESS_EXIT_RUNNING;
} else if (retval != process_handle->pid) {
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;
}
if (!WIFEXITED(stat_loc)) {
log_warn(LD_GENERAL, "Process %d did not exit normally",
- process_handle->pid);
+ (int)process_handle->pid);
return PROCESS_EXIT_ERROR;
}
diff --git a/src/ext/ed25519/donna/ed25519_tor.c b/src/ext/ed25519/donna/ed25519_tor.c
index 52b259dfe1..5f3fdc5dae 100644
--- a/src/ext/ed25519/donna/ed25519_tor.c
+++ b/src/ext/ed25519/donna/ed25519_tor.c
@@ -34,7 +34,7 @@
#define ED25519_FN2(fn,suffix) ED25519_FN3(fn,suffix)
#define ED25519_FN(fn) ED25519_FN2(fn,ED25519_SUFFIX)
-
+#include "orconfig.h"
#include "ed25519-donna.h"
#include "ed25519_donna_tor.h"
#include "ed25519-randombytes.h"
diff --git a/src/ext/ed25519/ref10/keypair.c b/src/ext/ed25519/ref10/keypair.c
index 7ddbaa971e..68a88f9adc 100644
--- a/src/ext/ed25519/ref10/keypair.c
+++ b/src/ext/ed25519/ref10/keypair.c
@@ -1,6 +1,7 @@
/* Modified for Tor: new API, 64-byte secret keys. */
-#include <string.h>
+
#include "randombytes.h"
+#include <string.h>
#include "crypto_sign.h"
#include "crypto_hash_sha512.h"
#include "ge.h"
diff --git a/src/ext/ed25519/ref10/open.c b/src/ext/ed25519/ref10/open.c
index 9dbeb4cdd0..3ab7b7d6e7 100644
--- a/src/ext/ed25519/ref10/open.c
+++ b/src/ext/ed25519/ref10/open.c
@@ -1,6 +1,7 @@
/* (Modified by Tor to verify signature separately from message) */
-#include <string.h>
+
#include "crypto_sign.h"
+#include <string.h>
#include "crypto_hash_sha512.h"
#include "crypto_verify_32.h"
#include "ge.h"
diff --git a/src/or/circuitmux_ewma.c b/src/or/circuitmux_ewma.c
index b784a140ac..13836cdcfa 100644
--- a/src/or/circuitmux_ewma.c
+++ b/src/or/circuitmux_ewma.c
@@ -8,6 +8,8 @@
#define TOR_CIRCUITMUX_EWMA_C_
+#include "orconfig.h"
+
#include <math.h>
#include "or.h"
diff --git a/src/test/test-child.c b/src/test/test-child.c
index e2552a499d..fdf3ccec0a 100644
--- a/src/test/test-child.c
+++ b/src/test/test-child.c
@@ -1,8 +1,8 @@
/* Copyright (c) 2011-2016, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include <stdio.h>
#include "orconfig.h"
+#include <stdio.h>
#ifdef _WIN32
#define WINDOWS_LEAN_AND_MEAN
#include <windows.h>
diff --git a/src/test/test-memwipe.c b/src/test/test-memwipe.c
index 5d4fcec664..2689b95366 100644
--- a/src/test/test-memwipe.c
+++ b/src/test/test-memwipe.c
@@ -1,3 +1,4 @@
+#include "orconfig.h"
#include <string.h>
#include <stdio.h>
#include <sys/types.h>
diff --git a/src/test/test_channeltls.c b/src/test/test_channeltls.c
index 04ae9a6da7..fda466fc82 100644
--- a/src/test/test_channeltls.c
+++ b/src/test/test_channeltls.c
@@ -1,6 +1,8 @@
/* Copyright (c) 2014-2016, The Tor Project, Inc. */
/* See LICENSE for licensing information */
+#include "orconfig.h"
+
#include <math.h>
#define TOR_CHANNEL_INTERNAL_
diff --git a/src/test/test_scheduler.c b/src/test/test_scheduler.c
index 6e9889b48b..db331cb662 100644
--- a/src/test/test_scheduler.c
+++ b/src/test/test_scheduler.c
@@ -1,10 +1,10 @@
/* Copyright (c) 2014-2016, The Tor Project, Inc. */
/* See LICENSE for licensing information */
-#include <math.h>
-
#include "orconfig.h"
+#include <math.h>
+
/* Libevent stuff */
#ifdef HAVE_EVENT2_EVENT_H
#include <event2/event.h>
diff --git a/src/test/test_status.c b/src/test/test_status.c
index 84a0f6c024..1f4ec0a83e 100644
--- a/src/test/test_status.c
+++ b/src/test/test_status.c
@@ -3,6 +3,8 @@
#define LOG_PRIVATE
#define REPHIST_PRIVATE
+#include "orconfig.h"
+
#include <float.h>
#include <math.h>