Merge remote-tracking branch 'public/solaris_warnings_028'

This commit is contained in:
Nick Mathewson 2016-09-11 16:52:24 -04:00
commit 64521a9d35
21 changed files with 41 additions and 30 deletions

View File

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

View File

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

View File

@ -4702,13 +4702,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;
}

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -1,4 +1,4 @@
/* trunnel-impl.h -- copied from Trunnel v1.4.4
/* trunnel-impl.h -- copied from Trunnel v1.4.6
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -11,12 +11,12 @@
#ifndef TRUNNEL_IMPL_H_INCLUDED_
#define TRUNNEL_IMPL_H_INCLUDED_
#include "trunnel.h"
#include <assert.h>
#include <string.h>
#ifdef TRUNNEL_LOCAL_H
#include "trunnel-local.h"
#endif
#include "trunnel.h"
#include <assert.h>
#include <string.h>
#if defined(_MSC_VER) && (_MSC_VER < 1600)
#define uint8_t unsigned char

View File

@ -1,4 +1,4 @@
/* trunnel.c -- copied from Trunnel v1.4.4
/* trunnel.c -- copied from Trunnel v1.4.6
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -10,9 +10,9 @@
* See trunnel-impl.h for documentation of these functions.
*/
#include "trunnel-impl.h"
#include <stdlib.h>
#include <string.h>
#include "trunnel-impl.h"
#if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && \
__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__

View File

@ -1,4 +1,4 @@
/* trunnel.h -- copied from Trunnel v1.4.4
/* trunnel.h -- copied from Trunnel v1.4.6
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/

View File

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

View File

@ -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>

View File

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

View File

@ -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_

View File

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

View File

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

View File

@ -1,4 +1,4 @@
/* ed25519_cert.c -- generated by Trunnel v1.4.4.
/* ed25519_cert.c -- generated by Trunnel v1.4.6.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -157,7 +157,7 @@ ed25519_cert_extension_setlen_un_unparsed(ed25519_cert_extension_t *inp, size_t
&inp->un_unparsed.n_, inp->un_unparsed.elts_, newlen,
sizeof(inp->un_unparsed.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
if (newptr == NULL)
if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->un_unparsed.elts_ = newptr;
return 0;
@ -589,7 +589,7 @@ ed25519_cert_setlen_ext(ed25519_cert_t *inp, size_t newlen)
&inp->ext.n_, inp->ext.elts_, newlen,
sizeof(inp->ext.elts_[0]), (trunnel_free_fn_t) ed25519_cert_extension_free,
&inp->trunnel_error_code_);
if (newptr == NULL)
if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->ext.elts_ = newptr;
return 0;

View File

@ -1,4 +1,4 @@
/* ed25519_cert.h -- generated by by Trunnel v1.4.4.
/* ed25519_cert.h -- generated by by Trunnel v1.4.6.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/

View File

@ -1,4 +1,4 @@
/* link_handshake.c -- generated by Trunnel v1.4.4.
/* link_handshake.c -- generated by Trunnel v1.4.6.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -143,7 +143,7 @@ auth_challenge_cell_setlen_methods(auth_challenge_cell_t *inp, size_t newlen)
&inp->methods.n_, inp->methods.elts_, newlen,
sizeof(inp->methods.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
if (newptr == NULL)
if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->methods.elts_ = newptr;
return 0;
@ -452,7 +452,7 @@ certs_cell_cert_setlen_body(certs_cell_cert_t *inp, size_t newlen)
&inp->body.n_, inp->body.elts_, newlen,
sizeof(inp->body.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
if (newptr == NULL)
if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->body.elts_ = newptr;
return 0;
@ -747,7 +747,7 @@ rsa_ed_crosscert_setlen_sig(rsa_ed_crosscert_t *inp, size_t newlen)
&inp->sig.n_, inp->sig.elts_, newlen,
sizeof(inp->sig.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
if (newptr == NULL)
if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->sig.elts_ = newptr;
return 0;
@ -1268,7 +1268,7 @@ auth1_setlen_sig(auth1_t *inp, size_t newlen)
&inp->sig.n_, inp->sig.elts_, newlen,
sizeof(inp->sig.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
if (newptr == NULL)
if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->sig.elts_ = newptr;
return 0;
@ -1714,7 +1714,7 @@ certs_cell_setlen_certs(certs_cell_t *inp, size_t newlen)
&inp->certs.n_, inp->certs.elts_, newlen,
sizeof(inp->certs.elts_[0]), (trunnel_free_fn_t) certs_cell_cert_free,
&inp->trunnel_error_code_);
if (newptr == NULL)
if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->certs.elts_ = newptr;
return 0;

View File

@ -1,4 +1,4 @@
/* link_handshake.h -- generated by by Trunnel v1.4.4.
/* link_handshake.h -- generated by by Trunnel v1.4.6.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/

View File

@ -1,4 +1,4 @@
/* pwbox.c -- generated by Trunnel v1.4.4.
/* pwbox.c -- generated by Trunnel v1.4.6.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/
@ -151,7 +151,7 @@ pwbox_encoded_setlen_skey_header(pwbox_encoded_t *inp, size_t newlen)
&inp->skey_header.n_, inp->skey_header.elts_, newlen,
sizeof(inp->skey_header.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
if (newptr == NULL)
if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->skey_header.elts_ = newptr;
return 0;
@ -226,7 +226,7 @@ pwbox_encoded_setlen_data(pwbox_encoded_t *inp, size_t newlen)
&inp->data.n_, inp->data.elts_, newlen,
sizeof(inp->data.elts_[0]), (trunnel_free_fn_t) NULL,
&inp->trunnel_error_code_);
if (newptr == NULL)
if (newlen != 0 && newptr == NULL)
goto trunnel_alloc_failed;
inp->data.elts_ = newptr;
return 0;

View File

@ -1,4 +1,4 @@
/* pwbox.h -- generated by by Trunnel v1.4.4.
/* pwbox.h -- generated by by Trunnel v1.4.6.
* https://gitweb.torproject.org/trunnel.git
* You probably shouldn't edit this file.
*/