aboutsummaryrefslogtreecommitdiff
path: root/docs/examples/smooth-gtk-thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/examples/smooth-gtk-thread.c')
-rw-r--r--docs/examples/smooth-gtk-thread.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/docs/examples/smooth-gtk-thread.c b/docs/examples/smooth-gtk-thread.c
index 271939cea..2d41aa248 100644
--- a/docs/examples/smooth-gtk-thread.c
+++ b/docs/examples/smooth-gtk-thread.c
@@ -33,7 +33,7 @@
pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER;
int j = 0;
gint num_urls = 9; /* Just make sure this is less than urls[]*/
-char *urls[]= {
+const char * const urls[]= {
"90022",
"90023",
"90024",
@@ -58,7 +58,6 @@ void *pull_one_url(void *NaN)
CURLcode res;
gchar *http;
FILE *outfile;
- gint i;
/* Stop threads from entering unless j is incremented */
pthread_mutex_lock(&lock);
@@ -167,7 +166,9 @@ static gboolean cb_delete(GtkWidget *window, gpointer data)
int main(int argc, char **argv)
{
GtkWidget *top_window, *outside_frame, *inside_frame, *progress_bar;
- GtkAdjustment *adj;
+
+ /* Must initialize libcurl before any threads are started */
+ curl_global_init(CURL_GLOBAL_ALL);
/* Init thread */
g_thread_init(NULL);