[or-cvs] r10644: Build with fewer compiler warnings on Sun. (This and previou (in tor/trunk: . src/common src/or)
nickm at seul.org
nickm at seul.org
Sun Jun 17 18:22:35 UTC 2007
Author: nickm
Date: 2007-06-17 14:22:35 -0400 (Sun, 17 Jun 2007)
New Revision: 10644
Modified:
tor/trunk/
tor/trunk/src/common/container.c
tor/trunk/src/common/container.h
tor/trunk/src/common/mempool.c
tor/trunk/src/or/dns.c
tor/trunk/src/or/test.c
Log:
r13476 at catbus: nickm | 2007-06-17 14:04:41 -0400
Build with fewer compiler warnings on Sun. (This and previous Sun patches are thanks to the tremendously handy services of unix-center.net.)
Property changes on: tor/trunk
___________________________________________________________________
svk:merge ticket from /tor/trunk [r13476] on 8246c3cf-6607-4228-993b-4d95d33730f1
Modified: tor/trunk/src/common/container.c
===================================================================
--- tor/trunk/src/common/container.c 2007-06-17 17:43:25 UTC (rev 10643)
+++ tor/trunk/src/common/container.c 2007-06-17 18:22:35 UTC (rev 10644)
@@ -663,10 +663,10 @@
} prefix ## entry_t; \
struct maptype { \
HT_HEAD(prefix ## impl, prefix ## entry_t) head; \
- };
+ }
-DEFINE_MAP_STRUCTS(strmap_t, char *key, strmap_);
-DEFINE_MAP_STRUCTS(digestmap_t, char key[DIGEST_LEN], digestmap_);
+DEFINE_MAP_STRUCTS(strmap_t, char *key, strmap_)
+DEFINE_MAP_STRUCTS(digestmap_t, char key[DIGEST_LEN], digestmap_)
/** Helper: compare strmap_entry_t objects by key value. */
static INLINE int
@@ -698,14 +698,14 @@
}
HT_PROTOTYPE(strmap_impl, strmap_entry_t, node, strmap_entry_hash,
- strmap_entries_eq);
+ strmap_entries_eq)
HT_GENERATE(strmap_impl, strmap_entry_t, node, strmap_entry_hash,
- strmap_entries_eq, 0.6, malloc, realloc, free);
+ strmap_entries_eq, 0.6, malloc, realloc, free)
HT_PROTOTYPE(digestmap_impl, digestmap_entry_t, node, digestmap_entry_hash,
- digestmap_entries_eq);
+ digestmap_entries_eq)
HT_GENERATE(digestmap_impl, digestmap_entry_t, node, digestmap_entry_hash,
- digestmap_entries_eq, 0.6, malloc, realloc, free);
+ digestmap_entries_eq, 0.6, malloc, realloc, free)
/** Constructor to create a new empty map from strings to void*'s.
*/
Modified: tor/trunk/src/common/container.h
===================================================================
--- tor/trunk/src/common/container.h 2007-06-17 17:43:25 UTC (rev 10643)
+++ tor/trunk/src/common/container.h 2007-06-17 18:22:35 UTC (rev 10644)
@@ -193,7 +193,7 @@
prefix##iter_t *prefix##iter_next_rmv(maptype *map, prefix##iter_t *iter); \
void prefix##iter_get(prefix##iter_t *iter, keytype *keyp, void **valp); \
int prefix##iter_done(prefix##iter_t *iter); \
- void prefix##assert_ok(const maptype *map);
+ void prefix##assert_ok(const maptype *map)
/* Map from const char * to void *. Implemented with a hash table. */
DECLARE_MAP_FNS(strmap_t, const char *, strmap_);
Modified: tor/trunk/src/common/mempool.c
===================================================================
--- tor/trunk/src/common/mempool.c 2007-06-17 17:43:25 UTC (rev 10643)
+++ tor/trunk/src/common/mempool.c 2007-06-17 18:22:35 UTC (rev 10644)
@@ -1,6 +1,11 @@
/* Copyright 2007 Nick Mathewson */
/* See LICENSE for licensing information */
/* $Id$ */
+#if 1
+/* Tor dependencies */
+#include "orconfig.h"
+#endif
+
#include <stdlib.h>
#include <string.h>
Modified: tor/trunk/src/or/dns.c
===================================================================
--- tor/trunk/src/or/dns.c 2007-06-17 17:43:25 UTC (rev 10643)
+++ tor/trunk/src/or/dns.c 2007-06-17 18:22:35 UTC (rev 10644)
@@ -128,9 +128,9 @@
}
HT_PROTOTYPE(cache_map, cached_resolve_t, node, cached_resolve_hash,
- cached_resolves_eq);
+ cached_resolves_eq)
HT_GENERATE(cache_map, cached_resolve_t, node, cached_resolve_hash,
- cached_resolves_eq, 0.6, malloc, realloc, free);
+ cached_resolves_eq, 0.6, malloc, realloc, free)
/** Initialize the DNS cache. */
static void
Modified: tor/trunk/src/or/test.c
===================================================================
--- tor/trunk/src/or/test.c 2007-06-17 17:43:25 UTC (rev 10643)
+++ tor/trunk/src/or/test.c 2007-06-17 18:22:35 UTC (rev 10644)
@@ -1408,7 +1408,7 @@
/* Skip this test if we aren't threading. We should be threading most
* everywhere by now. */
if (1)
- return 0;
+ return;
#endif
_thread_test_mutex = tor_mutex_new();
_thread_test_start1 = tor_mutex_new();
@@ -1520,7 +1520,7 @@
test_assert(!tor_gzip_compress(&buf2, &len1, buf1, strlen(buf1)+1,
GZIP_METHOD));
test_assert(buf2);
- test_assert(!memcmp(buf2, "\037\213", 2)); /* Gztip magic. */
+ test_assert(!memcmp(buf2, "\037\213", 2)); /* Gzip magic. */
test_assert(detect_compression_method(buf2, len1) == GZIP_METHOD);
test_assert(!tor_gzip_uncompress(&buf3, &len2, buf2, len1,
More information about the tor-commits
mailing list