diff options
-rw-r--r-- | src/arm/gnunet-service-arm.c | 2 | ||||
-rw-r--r-- | src/ats/gnunet-service-ats_addresses_mlp.c | 2 | ||||
-rw-r--r-- | src/exit/gnunet-daemon-exit.c | 2 | ||||
-rw-r--r-- | src/fs/fs_uri.c | 3 | ||||
-rw-r--r-- | src/fs/gnunet-download.c | 3 | ||||
-rw-r--r-- | src/fs/gnunet-pseudonym.c | 3 | ||||
-rw-r--r-- | src/hostlist/hostlist-server.c | 2 | ||||
-rw-r--r-- | src/integration-tests/connection_watchdog.c | 2 | ||||
-rw-r--r-- | src/mesh/gnunet-service-mesh.c | 6 | ||||
-rw-r--r-- | src/mesh/mesh_api.c | 21 | ||||
-rw-r--r-- | src/transport/plugin_transport_smtp.c | 6 | ||||
-rw-r--r-- | src/transport/plugin_transport_udp.c | 8 | ||||
-rw-r--r-- | src/util/common_logging.c | 13 | ||||
-rw-r--r-- | src/util/container_slist.c | 3 | ||||
-rw-r--r-- | src/util/disk.c | 3 | ||||
-rw-r--r-- | src/util/getopt.c | 15 | ||||
-rw-r--r-- | src/util/network.c | 24 | ||||
-rw-r--r-- | src/util/os_priority.c | 9 | ||||
-rw-r--r-- | src/util/program.c | 6 | ||||
-rw-r--r-- | src/util/pseudonym.c | 3 | ||||
-rw-r--r-- | src/util/server.c | 2 |
21 files changed, 64 insertions, 74 deletions
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c index 45650188f..ce9104334 100644 --- a/src/arm/gnunet-service-arm.c +++ b/src/arm/gnunet-service-arm.c | |||
@@ -494,7 +494,7 @@ static void | |||
494 | create_listen_socket (struct sockaddr *sa, socklen_t addr_len, | 494 | create_listen_socket (struct sockaddr *sa, socklen_t addr_len, |
495 | struct ServiceList *sl) | 495 | struct ServiceList *sl) |
496 | { | 496 | { |
497 | const static int on = 1; | 497 | static int on = 1; |
498 | struct GNUNET_NETWORK_Handle *sock; | 498 | struct GNUNET_NETWORK_Handle *sock; |
499 | struct ServiceListeningInfo *sli; | 499 | struct ServiceListeningInfo *sli; |
500 | 500 | ||
diff --git a/src/ats/gnunet-service-ats_addresses_mlp.c b/src/ats/gnunet-service-ats_addresses_mlp.c index d4c2c177a..532fadadf 100644 --- a/src/ats/gnunet-service-ats_addresses_mlp.c +++ b/src/ats/gnunet-service-ats_addresses_mlp.c | |||
@@ -1126,7 +1126,7 @@ GAS_mlp_init (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1126 | double D; | 1126 | double D; |
1127 | double R; | 1127 | double R; |
1128 | double U; | 1128 | double U; |
1129 | long long unsigned int tmp; | 1129 | unsigned long long tmp; |
1130 | unsigned int b_min; | 1130 | unsigned int b_min; |
1131 | unsigned int n_min; | 1131 | unsigned int n_min; |
1132 | struct GNUNET_TIME_Relative i_exec; | 1132 | struct GNUNET_TIME_Relative i_exec; |
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c index 861742ee8..e58611cc6 100644 --- a/src/exit/gnunet-daemon-exit.c +++ b/src/exit/gnunet-daemon-exit.c | |||
@@ -284,7 +284,7 @@ static struct GNUNET_CONTAINER_Heap *connections_heap; | |||
284 | /** | 284 | /** |
285 | * If there are at least this many connections, old ones will be removed | 285 | * If there are at least this many connections, old ones will be removed |
286 | */ | 286 | */ |
287 | static long long unsigned int max_connections; | 287 | static unsigned long long max_connections; |
288 | 288 | ||
289 | /** | 289 | /** |
290 | * This hashmaps saves interesting things about the configured UDP services | 290 | * This hashmaps saves interesting things about the configured UDP services |
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c index dc6d195ca..0c2d64cac 100644 --- a/src/fs/fs_uri.c +++ b/src/fs/fs_uri.c | |||
@@ -1377,7 +1377,8 @@ GNUNET_FS_uri_sks_to_string_fancy (struct GNUNET_CONFIGURATION_Handle *cfg, | |||
1377 | const struct GNUNET_FS_Uri *uri) | 1377 | const struct GNUNET_FS_Uri *uri) |
1378 | { | 1378 | { |
1379 | char *ret; | 1379 | char *ret; |
1380 | char *name, *unique_name; | 1380 | char *name; |
1381 | char *unique_name; | ||
1381 | 1382 | ||
1382 | if (uri->type != sks) | 1383 | if (uri->type != sks) |
1383 | return NULL; | 1384 | return NULL; |
diff --git a/src/fs/gnunet-download.c b/src/fs/gnunet-download.c index ff10c39c6..5a66aea27 100644 --- a/src/fs/gnunet-download.c +++ b/src/fs/gnunet-download.c | |||
@@ -90,7 +90,8 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
90 | static void * | 90 | static void * |
91 | progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) | 91 | progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info) |
92 | { | 92 | { |
93 | char *s, *s2; | 93 | char *s; |
94 | char *s2; | ||
94 | char *t; | 95 | char *t; |
95 | 96 | ||
96 | switch (info->status) | 97 | switch (info->status) |
diff --git a/src/fs/gnunet-pseudonym.c b/src/fs/gnunet-pseudonym.c index 247a5a0d8..38826d1de 100644 --- a/src/fs/gnunet-pseudonym.c +++ b/src/fs/gnunet-pseudonym.c | |||
@@ -109,7 +109,8 @@ pseudo_printer (void *cls, const GNUNET_HashCode * pseudonym, | |||
109 | const char *name, const char *unique_name, | 109 | const char *name, const char *unique_name, |
110 | const struct GNUNET_CONTAINER_MetaData *md, int rating) | 110 | const struct GNUNET_CONTAINER_MetaData *md, int rating) |
111 | { | 111 | { |
112 | char *id, *unique_id; | 112 | char *id; |
113 | char *unique_id; | ||
113 | int getinfo_result; | 114 | int getinfo_result; |
114 | 115 | ||
115 | /* While we get a name from the caller, it might be NULL. | 116 | /* While we get a name from the caller, it might be NULL. |
diff --git a/src/hostlist/hostlist-server.c b/src/hostlist/hostlist-server.c index af46110ca..66263e1a3 100644 --- a/src/hostlist/hostlist-server.c +++ b/src/hostlist/hostlist-server.c | |||
@@ -481,7 +481,7 @@ prepare_daemon (struct MHD_Daemon *daemon_handle) | |||
481 | struct GNUNET_NETWORK_FDSet *wws; | 481 | struct GNUNET_NETWORK_FDSet *wws; |
482 | struct GNUNET_NETWORK_FDSet *wes; | 482 | struct GNUNET_NETWORK_FDSet *wes; |
483 | int max; | 483 | int max; |
484 | unsigned MHD_LONG_LONG timeout; | 484 | MHD_LONG_LONG timeout; |
485 | int haveto; | 485 | int haveto; |
486 | struct GNUNET_TIME_Relative tv; | 486 | struct GNUNET_TIME_Relative tv; |
487 | 487 | ||
diff --git a/src/integration-tests/connection_watchdog.c b/src/integration-tests/connection_watchdog.c index 00da55eee..709ca4eeb 100644 --- a/src/integration-tests/connection_watchdog.c +++ b/src/integration-tests/connection_watchdog.c | |||
@@ -971,7 +971,7 @@ init () | |||
971 | char *pos; | 971 | char *pos; |
972 | char *secname; | 972 | char *secname; |
973 | int counter; | 973 | int counter; |
974 | long long unsigned int port; | 974 | unsigned long long port; |
975 | 975 | ||
976 | have_tcp = GNUNET_NO; | 976 | have_tcp = GNUNET_NO; |
977 | have_udp = GNUNET_NO; | 977 | have_udp = GNUNET_NO; |
diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index 31e0dc901..aa9ae888c 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c | |||
@@ -623,7 +623,7 @@ announce_application (void *cls, const GNUNET_HashCode * key, void *value) | |||
623 | { | 623 | { |
624 | /* FIXME are hashes in multihash map equal on all aquitectures? */ | 624 | /* FIXME are hashes in multihash map equal on all aquitectures? */ |
625 | /* FIXME: keep return value of 'put' to possibly cancel!? */ | 625 | /* FIXME: keep return value of 'put' to possibly cancel!? */ |
626 | GNUNET_DHT_put (dht_handle, key, 10U, | 626 | GNUNET_DHT_put (dht_handle, key, 10, |
627 | GNUNET_DHT_RO_RECORD_ROUTE | | 627 | GNUNET_DHT_RO_RECORD_ROUTE | |
628 | GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, GNUNET_BLOCK_TYPE_TEST, | 628 | GNUNET_DHT_RO_DEMULTIPLEX_EVERYWHERE, GNUNET_BLOCK_TYPE_TEST, |
629 | sizeof (struct GNUNET_PeerIdentity), | 629 | sizeof (struct GNUNET_PeerIdentity), |
@@ -692,12 +692,8 @@ announce_id (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
692 | (char *) &my_full_id, /* Data itself */ | 692 | (char *) &my_full_id, /* Data itself */ |
693 | GNUNET_TIME_absolute_get_forever (), /* Data expiration */ | 693 | GNUNET_TIME_absolute_get_forever (), /* Data expiration */ |
694 | GNUNET_TIME_UNIT_FOREVER_REL, /* Retry time */ | 694 | GNUNET_TIME_UNIT_FOREVER_REL, /* Retry time */ |
695 | #if MESH_DEBUG_DHT | ||
696 | &mesh_debug, "DHT_put for id completed"); | ||
697 | #else | ||
698 | NULL, /* Continuation */ | 695 | NULL, /* Continuation */ |
699 | NULL); /* Continuation closure */ | 696 | NULL); /* Continuation closure */ |
700 | #endif | ||
701 | announce_id_task = | 697 | announce_id_task = |
702 | GNUNET_SCHEDULER_add_delayed (ID_ANNOUNCE_TIME, &announce_id, cls); | 698 | GNUNET_SCHEDULER_add_delayed (ID_ANNOUNCE_TIME, &announce_id, cls); |
703 | } | 699 | } |
diff --git a/src/mesh/mesh_api.c b/src/mesh/mesh_api.c index 7332d0c3d..de931db7c 100644 --- a/src/mesh/mesh_api.c +++ b/src/mesh/mesh_api.c | |||
@@ -28,14 +28,6 @@ | |||
28 | * - SEND FUNCTIONS | 28 | * - SEND FUNCTIONS |
29 | * - API CALL DEFINITIONS | 29 | * - API CALL DEFINITIONS |
30 | */ | 30 | */ |
31 | #ifdef __cplusplus | ||
32 | extern "C" | ||
33 | { | ||
34 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
35 | } | ||
36 | #endif | ||
37 | #endif | ||
38 | |||
39 | #include "platform.h" | 31 | #include "platform.h" |
40 | #include "gnunet_common.h" | 32 | #include "gnunet_common.h" |
41 | #include "gnunet_client_lib.h" | 33 | #include "gnunet_client_lib.h" |
@@ -45,13 +37,8 @@ extern "C" | |||
45 | #include "mesh.h" | 37 | #include "mesh.h" |
46 | #include "mesh_protocol.h" | 38 | #include "mesh_protocol.h" |
47 | 39 | ||
48 | #define MESH_API_DEBUG GNUNET_YES | ||
49 | |||
50 | #if MESH_API_DEBUG | ||
51 | #define LOG(kind,...) GNUNET_log_from (kind, "mesh-api",__VA_ARGS__) | 40 | #define LOG(kind,...) GNUNET_log_from (kind, "mesh-api",__VA_ARGS__) |
52 | #else | 41 | |
53 | #define LOG(kind,...) | ||
54 | #endif | ||
55 | 42 | ||
56 | /******************************************************************************/ | 43 | /******************************************************************************/ |
57 | /************************ DATA STRUCTURES ****************************/ | 44 | /************************ DATA STRUCTURES ****************************/ |
@@ -1717,9 +1704,3 @@ GNUNET_MESH_tunnel_get_data (struct GNUNET_MESH_Tunnel *tunnel) | |||
1717 | } | 1704 | } |
1718 | 1705 | ||
1719 | 1706 | ||
1720 | #if 0 /* keep Emacsens' auto-indent happy */ | ||
1721 | { | ||
1722 | #endif | ||
1723 | #ifdef __cplusplus | ||
1724 | } | ||
1725 | #endif | ||
diff --git a/src/transport/plugin_transport_smtp.c b/src/transport/plugin_transport_smtp.c index b589e1177..609b11596 100644 --- a/src/transport/plugin_transport_smtp.c +++ b/src/transport/plugin_transport_smtp.c | |||
@@ -774,7 +774,7 @@ api_associate (GNUNET_TSession * tsession) | |||
774 | * frequency limits to SMTP in the future!). | 774 | * frequency limits to SMTP in the future!). |
775 | */ | 775 | */ |
776 | static int | 776 | static int |
777 | api_test_would_try (GNUNET_TSession * tsession, const unsigned int size, | 777 | api_test_would_try (GNUNET_TSession * tsession, unsigned int size, |
778 | int important) | 778 | int important) |
779 | { | 779 | { |
780 | return GNUNET_OK; /* we always try... */ | 780 | return GNUNET_OK; /* we always try... */ |
@@ -785,10 +785,8 @@ api_test_would_try (GNUNET_TSession * tsession, const unsigned int size, | |||
785 | * returns the smtp transport API. | 785 | * returns the smtp transport API. |
786 | */ | 786 | */ |
787 | GNUNET_TransportAPI * | 787 | GNUNET_TransportAPI * |
788 | inittransport_smtp (GNUNET_CoreAPIForTransport * core) | 788 | inittransport_smtp (struct GNUNET_CoreAPIForTransport * core) |
789 | { | 789 | { |
790 | |||
791 | |||
792 | unsigned long long mtu; | 790 | unsigned long long mtu; |
793 | struct sigaction sa; | 791 | struct sigaction sa; |
794 | 792 | ||
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index ae710c73c..76fd1a6cd 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -1760,8 +1760,6 @@ udp_select_send (struct Plugin *plugin, struct GNUNET_NETWORK_Handle *sock) | |||
1760 | ssize_t sent; | 1760 | ssize_t sent; |
1761 | size_t slen; | 1761 | size_t slen; |
1762 | struct GNUNET_TIME_Absolute max; | 1762 | struct GNUNET_TIME_Absolute max; |
1763 | struct GNUNET_TIME_Absolute ; | ||
1764 | |||
1765 | struct UDPMessageWrapper *udpw = NULL; | 1763 | struct UDPMessageWrapper *udpw = NULL; |
1766 | 1764 | ||
1767 | if (sock == plugin->sockv4) | 1765 | if (sock == plugin->sockv4) |
@@ -1859,9 +1857,9 @@ udp_select_send (struct Plugin *plugin, struct GNUNET_NETWORK_Handle *sock) | |||
1859 | * have a valid global IPv6 address assigned | 1857 | * have a valid global IPv6 address assigned |
1860 | */ | 1858 | */ |
1861 | LOG (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, | 1859 | LOG (GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, |
1862 | _("UDP could not message to `%s': `%s'\n, " \ | 1860 | _("UDP could not message to `%s': `%s'. " |
1863 | "Please check your network configuration and disable IPv6 if your\n" \ | 1861 | "Please check your network configuration and disable IPv6 if your " |
1864 | "connection does not have a global IPv6 address"), | 1862 | "connection does not have a global IPv6 address\n"), |
1865 | GNUNET_a2s (sa, slen), | 1863 | GNUNET_a2s (sa, slen), |
1866 | STRERROR (errno)); | 1864 | STRERROR (errno)); |
1867 | } | 1865 | } |
diff --git a/src/util/common_logging.c b/src/util/common_logging.c index 995f2e88a..2c0fd57a8 100644 --- a/src/util/common_logging.c +++ b/src/util/common_logging.c | |||
@@ -530,6 +530,8 @@ parse_all_definitions () | |||
530 | gnunet_force_log_parsed = GNUNET_YES; | 530 | gnunet_force_log_parsed = GNUNET_YES; |
531 | } | 531 | } |
532 | #endif | 532 | #endif |
533 | |||
534 | |||
533 | /** | 535 | /** |
534 | * Setup logging. | 536 | * Setup logging. |
535 | * | 537 | * |
@@ -569,17 +571,16 @@ GNUNET_log_setup (const char *comp, const char *loglevel, const char *logfile) | |||
569 | if (NULL == fn) | 571 | if (NULL == fn) |
570 | return GNUNET_SYSERR; | 572 | return GNUNET_SYSERR; |
571 | dirwarn = (GNUNET_OK != GNUNET_DISK_directory_create_for_file (fn)); | 573 | dirwarn = (GNUNET_OK != GNUNET_DISK_directory_create_for_file (fn)); |
572 | altlog_fd = OPEN (fn, O_APPEND | | ||
573 | #if WINDOWS | 574 | #if WINDOWS |
575 | altlog_fd = OPEN (fn, O_APPEND | | ||
574 | O_BINARY | | 576 | O_BINARY | |
575 | #endif | ||
576 | O_WRONLY | O_CREAT, | 577 | O_WRONLY | O_CREAT, |
577 | #if WINDOWS | 578 | _S_IREAD | _S_IWRITE); |
578 | _S_IREAD | _S_IWRITE | ||
579 | #else | 579 | #else |
580 | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH | 580 | altlog_fd = OPEN (fn, O_APPEND | |
581 | O_WRONLY | O_CREAT, | ||
582 | S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); | ||
581 | #endif | 583 | #endif |
582 | ); | ||
583 | if (altlog_fd != -1) | 584 | if (altlog_fd != -1) |
584 | { | 585 | { |
585 | int dup_return; | 586 | int dup_return; |
diff --git a/src/util/container_slist.c b/src/util/container_slist.c index 950c4245e..6b5832583 100644 --- a/src/util/container_slist.c +++ b/src/util/container_slist.c | |||
@@ -268,6 +268,7 @@ GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l, | |||
268 | return GNUNET_NO; | 268 | return GNUNET_NO; |
269 | } | 269 | } |
270 | 270 | ||
271 | typedef int (*Comparator)(const void *, size_t, const void *, size_t); | ||
271 | 272 | ||
272 | /** | 273 | /** |
273 | * Check if a list contains a certain element | 274 | * Check if a list contains a certain element |
@@ -283,7 +284,7 @@ GNUNET_CONTAINER_slist_contains (const struct GNUNET_CONTAINER_SList *l, | |||
283 | void * | 284 | void * |
284 | GNUNET_CONTAINER_slist_contains2 (const struct GNUNET_CONTAINER_SList *l, | 285 | GNUNET_CONTAINER_slist_contains2 (const struct GNUNET_CONTAINER_SList *l, |
285 | const void *buf, size_t len, | 286 | const void *buf, size_t len, |
286 | int (*compare)(const void *, const size_t, const void *, const size_t)) | 287 | Comparator compare) |
287 | { | 288 | { |
288 | struct GNUNET_CONTAINER_SList_Elem *e; | 289 | struct GNUNET_CONTAINER_SList_Elem *e; |
289 | 290 | ||
diff --git a/src/util/disk.c b/src/util/disk.c index 847dad457..cba0d4467 100644 --- a/src/util/disk.c +++ b/src/util/disk.c | |||
@@ -270,7 +270,8 @@ GNUNET_DISK_file_seek (const struct GNUNET_DISK_FileHandle * h, OFF_T offset, | |||
270 | } | 270 | } |
271 | 271 | ||
272 | #ifdef MINGW | 272 | #ifdef MINGW |
273 | LARGE_INTEGER li, new_pos; | 273 | LARGE_INTEGER li; |
274 | LARGE_INTEGER new_pos; | ||
274 | BOOL b; | 275 | BOOL b; |
275 | 276 | ||
276 | static DWORD t[] = {[GNUNET_DISK_SEEK_SET] = FILE_BEGIN, | 277 | static DWORD t[] = {[GNUNET_DISK_SEEK_SET] = FILE_BEGIN, |
diff --git a/src/util/getopt.c b/src/util/getopt.c index 169949821..572e534c5 100644 --- a/src/util/getopt.c +++ b/src/util/getopt.c | |||
@@ -202,9 +202,8 @@ char * | |||
202 | getenv (); | 202 | getenv (); |
203 | 203 | ||
204 | static char * | 204 | static char * |
205 | my_index (str, chr) | 205 | my_index (const char *str, |
206 | const char *str; | 206 | int chr) |
207 | int chr; | ||
208 | { | 207 | { |
209 | while (*str) | 208 | while (*str) |
210 | { | 209 | { |
@@ -294,8 +293,7 @@ exchange (char **); | |||
294 | #endif | 293 | #endif |
295 | 294 | ||
296 | static void | 295 | static void |
297 | exchange (argv) | 296 | exchange (char **argv) |
298 | char **argv; | ||
299 | { | 297 | { |
300 | int bottom = first_nonopt; | 298 | int bottom = first_nonopt; |
301 | int middle = last_nonopt; | 299 | int middle = last_nonopt; |
@@ -381,10 +379,9 @@ static const char * | |||
381 | _getopt_initialize (int, char *const *, const char *); | 379 | _getopt_initialize (int, char *const *, const char *); |
382 | #endif | 380 | #endif |
383 | static const char * | 381 | static const char * |
384 | _getopt_initialize (argc, argv, optstring) | 382 | _getopt_initialize (int argc, |
385 | int argc; | 383 | char *const *argv, |
386 | char *const *argv; | 384 | const char *optstring) |
387 | const char *optstring; | ||
388 | { | 385 | { |
389 | /* Start processing options with ARGV-element 1 (since ARGV-element 0 | 386 | /* Start processing options with ARGV-element 1 (since ARGV-element 0 |
390 | * is the program name); the sequence of previously skipped | 387 | * is the program name); the sequence of previously skipped |
diff --git a/src/util/network.c b/src/util/network.c index 54abcaba1..9323389ee 100644 --- a/src/util/network.c +++ b/src/util/network.c | |||
@@ -508,15 +508,16 @@ GNUNET_NETWORK_socket_recvfrom_amount (const struct GNUNET_NETWORK_Handle * | |||
508 | 508 | ||
509 | error = ioctl (desc->fd, FIONREAD, &pending); | 509 | error = ioctl (desc->fd, FIONREAD, &pending); |
510 | if (error == 0) | 510 | if (error == 0) |
511 | return (ssize_t) pending; | ||
512 | return GNUNET_NO; | ||
511 | #else | 513 | #else |
512 | u_long pending; | 514 | u_long pending; |
513 | 515 | ||
514 | error = ioctlsocket (desc->fd, FIONREAD, &pending); | 516 | error = ioctlsocket (desc->fd, FIONREAD, &pending); |
515 | if (error != SOCKET_ERROR) | 517 | if (error != SOCKET_ERROR) |
518 | return (ssize_t) pending; | ||
519 | return GNUNET_NO; | ||
516 | #endif | 520 | #endif |
517 | return pending; | ||
518 | else | ||
519 | return GNUNET_NO; | ||
520 | } | 521 | } |
521 | 522 | ||
522 | 523 | ||
@@ -1079,7 +1080,6 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds, | |||
1079 | const struct GNUNET_TIME_Relative timeout) | 1080 | const struct GNUNET_TIME_Relative timeout) |
1080 | { | 1081 | { |
1081 | int nfds = 0; | 1082 | int nfds = 0; |
1082 | |||
1083 | #ifdef MINGW | 1083 | #ifdef MINGW |
1084 | int handles = 0; | 1084 | int handles = 0; |
1085 | int ex_handles = 0; | 1085 | int ex_handles = 0; |
@@ -1090,7 +1090,9 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds, | |||
1090 | int retcode = 0; | 1090 | int retcode = 0; |
1091 | DWORD ms_total = 0; | 1091 | DWORD ms_total = 0; |
1092 | 1092 | ||
1093 | int nsock = 0, nhandles = 0, nSockEvents = 0; | 1093 | int nsock = 0; |
1094 | int nhandles = 0; | ||
1095 | int nSockEvents = 0; | ||
1094 | 1096 | ||
1095 | static HANDLE hEventRead = 0; | 1097 | static HANDLE hEventRead = 0; |
1096 | static HANDLE hEventWrite = 0; | 1098 | static HANDLE hEventWrite = 0; |
@@ -1106,12 +1108,18 @@ GNUNET_NETWORK_socket_select (struct GNUNET_NETWORK_FDSet *rfds, | |||
1106 | DWORD newretcode = 0; | 1108 | DWORD newretcode = 0; |
1107 | int returnedpos = 0; | 1109 | int returnedpos = 0; |
1108 | 1110 | ||
1109 | struct GNUNET_CONTAINER_SList *handles_read, *handles_write, *handles_except; | 1111 | struct GNUNET_CONTAINER_SList *handles_read; |
1112 | struct GNUNET_CONTAINER_SList *handles_write; | ||
1113 | struct GNUNET_CONTAINER_SList *handles_except; | ||
1110 | 1114 | ||
1111 | fd_set aread, awrite, aexcept; | 1115 | fd_set aread; |
1116 | fd_set awrite; | ||
1117 | fd_set except; | ||
1112 | 1118 | ||
1113 | #if DEBUG_NETWORK | 1119 | #if DEBUG_NETWORK |
1114 | fd_set bread, bwrite, bexcept; | 1120 | fd_set bread; |
1121 | fd_set bwrite; | ||
1122 | fd_set bexcept; | ||
1115 | #endif | 1123 | #endif |
1116 | 1124 | ||
1117 | /* TODO: Make this growable */ | 1125 | /* TODO: Make this growable */ |
diff --git a/src/util/os_priority.c b/src/util/os_priority.c index f374ca56d..9def6ca54 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c | |||
@@ -649,10 +649,15 @@ GNUNET_OS_set_process_priority (struct GNUNET_OS_Process *proc, | |||
649 | static char * | 649 | static char * |
650 | CreateCustomEnvTable (char **vars) | 650 | CreateCustomEnvTable (char **vars) |
651 | { | 651 | { |
652 | char *win32_env_table, *ptr, **var_ptr, *result, *result_ptr; | 652 | char *win32_env_table; |
653 | char *ptr; | ||
654 | char **var_ptr; | ||
655 | char *result; | ||
656 | char *result_ptr; | ||
653 | size_t tablesize = 0; | 657 | size_t tablesize = 0; |
654 | size_t items_count = 0; | 658 | size_t items_count = 0; |
655 | size_t n_found = 0, n_var; | 659 | size_t n_found = 0; |
660 | size_t n_var; | ||
656 | char *index = NULL; | 661 | char *index = NULL; |
657 | size_t c; | 662 | size_t c; |
658 | size_t var_len; | 663 | size_t var_len; |
diff --git a/src/util/program.c b/src/util/program.c index bfa58dc65..b6d0c78c6 100644 --- a/src/util/program.c +++ b/src/util/program.c | |||
@@ -95,10 +95,10 @@ program_main (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
95 | * @param a2 second command line option | 95 | * @param a2 second command line option |
96 | */ | 96 | */ |
97 | static int | 97 | static int |
98 | cmd_sorter (__const void *a1, __const void *a2) | 98 | cmd_sorter (const void *a1, const void *a2) |
99 | { | 99 | { |
100 | __const struct GNUNET_GETOPT_CommandLineOption *c1 = a1; | 100 | const struct GNUNET_GETOPT_CommandLineOption *c1 = a1; |
101 | __const struct GNUNET_GETOPT_CommandLineOption *c2 = a2; | 101 | const struct GNUNET_GETOPT_CommandLineOption *c2 = a2; |
102 | 102 | ||
103 | if (toupper ((unsigned char) c1->shortName) > | 103 | if (toupper ((unsigned char) c1->shortName) > |
104 | toupper ((unsigned char) c2->shortName)) | 104 | toupper ((unsigned char) c2->shortName)) |
diff --git a/src/util/pseudonym.c b/src/util/pseudonym.c index d2efdc98f..016573845 100644 --- a/src/util/pseudonym.c +++ b/src/util/pseudonym.c | |||
@@ -539,7 +539,8 @@ list_pseudonym_helper (void *cls, const char *fullname) | |||
539 | int32_t rating; | 539 | int32_t rating; |
540 | struct GNUNET_CONTAINER_MetaData *meta; | 540 | struct GNUNET_CONTAINER_MetaData *meta; |
541 | const char *fn; | 541 | const char *fn; |
542 | char *str, *name_unique; | 542 | char *str; |
543 | char *name_unique; | ||
543 | 544 | ||
544 | if (strlen (fullname) < sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)) | 545 | if (strlen (fullname) < sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)) |
545 | return GNUNET_OK; | 546 | return GNUNET_OK; |
diff --git a/src/util/server.c b/src/util/server.c index 6226dea6d..f707d1bf3 100644 --- a/src/util/server.c +++ b/src/util/server.c | |||
@@ -391,7 +391,7 @@ process_listen_socket (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
391 | static struct GNUNET_NETWORK_Handle * | 391 | static struct GNUNET_NETWORK_Handle * |
392 | open_listen_socket (const struct sockaddr *serverAddr, socklen_t socklen) | 392 | open_listen_socket (const struct sockaddr *serverAddr, socklen_t socklen) |
393 | { | 393 | { |
394 | const static int on = 1; | 394 | static int on = 1; |
395 | struct GNUNET_NETWORK_Handle *sock; | 395 | struct GNUNET_NETWORK_Handle *sock; |
396 | uint16_t port; | 396 | uint16_t port; |
397 | int eno; | 397 | int eno; |