static void initialize_gnutls(void);
static void deinitialize_gnutls(void);
-static void worker_thread(void);
+static void *worker_thread(void *unused);
int main(int argc, char **argv) {
return EXIT_FAILURE;
}
for (i = 0; i < thread_count; i++) {
- errno = pthread_create(threads + i, NULL,
- (void * (*)(void *))&worker_thread,
- NULL);
+ errno = pthread_create(threads + i, NULL, &worker_thread, NULL);
if (errno != 0) {
perror("failed to create worker thread");
return EXIT_FAILURE;
gnutls_global_deinit();
}
-static void worker_thread(void) {
+static void *worker_thread(void *unused) {
int client_socket;
+ (void)unused;
+
for (;;) {
/* Get next element from ring buffer. */
P(ringbuffer_full);
handle_connection(client_socket);
}
+
+ return NULL;
}