mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 04:13:28 +01:00
Fix compile with warnings problems on Snow Leopard
This commit is contained in:
parent
bb22d8fc45
commit
740806c453
@ -2790,7 +2790,7 @@ static char *microdesc_consensus_methods = NULL;
|
||||
* in a consensus vote document. Write it into the <b>out_len</b>-byte buffer
|
||||
* in <b>out</b>. Return -1 on failure and the number of characters written
|
||||
* on success. */
|
||||
int
|
||||
ssize_t
|
||||
dirvote_format_microdesc_vote_line(char *out, size_t out_len,
|
||||
const microdesc_t *md)
|
||||
{
|
||||
|
@ -56,10 +56,10 @@ HT_GENERATE(microdesc_map, microdesc_t, node,
|
||||
* On success, return the total number of bytes written, and set
|
||||
* *<b>annotation_len_out</b> to the number of bytes written as
|
||||
* annotations. */
|
||||
static int
|
||||
dump_microdescriptor(FILE *f, microdesc_t *md, int *annotation_len_out)
|
||||
static size_t
|
||||
dump_microdescriptor(FILE *f, microdesc_t *md, size_t *annotation_len_out)
|
||||
{
|
||||
int r = 0;
|
||||
size_t r = 0;
|
||||
/* XXXX drops unkown annotations. */
|
||||
if (md->last_listed) {
|
||||
char buf[ISO_TIME_LEN+1];
|
||||
@ -169,7 +169,7 @@ microdescs_add_list_to_cache(microdesc_cache_t *cache,
|
||||
|
||||
/* Okay, it's a new one. */
|
||||
if (f) {
|
||||
int annotation_len;
|
||||
size_t annotation_len;
|
||||
size = dump_microdescriptor(f, md, &annotation_len);
|
||||
md->saved_location = SAVED_IN_JOURNAL;
|
||||
cache->journal_len += size;
|
||||
@ -269,7 +269,7 @@ microdesc_cache_rebuild(microdesc_cache_t *cache)
|
||||
FILE *f;
|
||||
microdesc_t **mdp;
|
||||
smartlist_t *wrote;
|
||||
int size;
|
||||
size_t size;
|
||||
off_t off = 0;
|
||||
int orig_size, new_size;
|
||||
|
||||
@ -287,7 +287,7 @@ microdesc_cache_rebuild(microdesc_cache_t *cache)
|
||||
|
||||
HT_FOREACH(mdp, microdesc_map, &cache->map) {
|
||||
microdesc_t *md = *mdp;
|
||||
int annotation_len;
|
||||
size_t annotation_len;
|
||||
if (md->no_save)
|
||||
continue;
|
||||
|
||||
|
@ -3919,7 +3919,7 @@ dirserv_generate_networkstatus_vote_obj(crypto_pk_env_t *private_key,
|
||||
authority_cert_t *cert);
|
||||
|
||||
microdesc_t *dirvote_create_microdescriptor(const routerinfo_t *ri);
|
||||
int dirvote_format_microdesc_vote_line(char *out, size_t out_len,
|
||||
ssize_t dirvote_format_microdesc_vote_line(char *out, size_t out_len,
|
||||
const microdesc_t *md);
|
||||
int vote_routerstatus_find_microdesc_hash(char *digest256_out,
|
||||
const vote_routerstatus_t *vrs,
|
||||
|
Loading…
Reference in New Issue
Block a user