summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-01 05:20:23 -0700
committerKonstantin Käfer <mail@kkaefer.com>2014-10-01 05:20:23 -0700
commit708194cb1a4760cf97459b1531acedf86fa2baa7 (patch)
tree94a11335373933e796320c7439697525f2d24e0e /src
parent6b1a86c37c26434442cc52d47ba554b5cb308e32 (diff)
downloadqtlocation-mapboxgl-708194cb1a4760cf97459b1531acedf86fa2baa7.tar.gz
define variable outside of loop scope
Diffstat (limited to 'src')
-rw-r--r--src/util/uv-worker.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/uv-worker.c b/src/util/uv-worker.c
index 7fb42c8bd4..8b0cc6dda7 100644
--- a/src/util/uv-worker.c
+++ b/src/util/uv-worker.c
@@ -116,7 +116,8 @@ int uv_worker_init(uv_worker_t *worker, uv_loop_t *loop, int count, const char *
if (ret < 0) return ret;
// Initialize all worker threads.
- for (int i = 0; i < count; i++) {
+ int i;
+ for (i = 0; i < count; i++) {
uv__worker_thread_t *worker_thread = (uv__worker_thread_t *)malloc(sizeof(uv__worker_thread_t));
worker_thread->worker = worker;
ret = uv_thread_create(&worker_thread->thread, uv__worker_thread_loop, worker_thread);