Browse Source

typos (detected as warning by icc)

Nathalie Furmento 14 years ago
parent
commit
3b61934f1c

+ 1 - 2
examples/basic_examples/block.c

@@ -34,7 +34,7 @@ int execute_on(uint32_t where, device_func func, float *block, int pnx, int pny,
 {
 	starpu_codelet cl;
 	starpu_data_handle block_handle;
-        int i, j, k;
+        int i;
 
 	starpu_block_data_register(&block_handle, 0, (uintptr_t)block, pnx, pnx*pny, pnx, pny, pnz, sizeof(float));
 
@@ -75,7 +75,6 @@ int execute_on(uint32_t where, device_func func, float *block, int pnx, int pny,
 
 int main(int argc, char **argv)
 {
-	starpu_codelet cl;
         float *block, n=1.0;
         int i, j, k, ret;
         int nx=3;

+ 1 - 0
include/starpu_perfmodel.h

@@ -120,6 +120,7 @@ void starpu_perfmodel_debugfilepath(struct starpu_perfmodel_t *model,
 		enum starpu_perf_archtype arch, char *path, size_t maxlen);
 void starpu_perfmodel_get_arch_name(enum starpu_perf_archtype arch,
 		char *archname, size_t maxlen);
+int starpu_list_models(void);
 
 void starpu_force_bus_sampling(void);
 

+ 1 - 1
src/common/timing.c

@@ -39,7 +39,7 @@ static struct timespec reference_start_time_ts;
  * to have consistent timing measurements. The CLOCK_MONOTONIC_RAW clock is not
  * subject to NTP adjustments, but is not available on all systems (in that
  * case we use the CLOCK_MONOTONIC clock instead). */
-void __starpu_clock_gettime(struct timespec *ts) {
+static void __starpu_clock_gettime(struct timespec *ts) {
 #ifdef CLOCK_MONOTONIC_RAW
 	static int raw_supported = 0;
 	switch (raw_supported) {

+ 14 - 14
src/common/utils.h

@@ -53,21 +53,21 @@ int _starpu_check_mutex_deadlock(pthread_mutex_t *mutex);
 /* If FILE is currently on a comment line, eat it.  */
 void _starpu_drop_comments(FILE *f);
 
-#define PTHREAD_MUTEX_INIT(mutex, attr) { int ret = pthread_mutex_init((mutex), (attr)); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_mutex_init: %s\n", strerror(ret)); STARPU_ABORT(); }}
-#define PTHREAD_MUTEX_DESTROY(mutex) { int ret = pthread_mutex_destroy(mutex); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_mutex_destroy: %s\n", strerror(ret)); STARPU_ABORT(); }}
-#define PTHREAD_MUTEX_LOCK(mutex) { int ret = pthread_mutex_lock(mutex); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_mutex_lock : %s\n", strerror(ret)); STARPU_ABORT(); }}
-#define PTHREAD_MUTEX_UNLOCK(mutex) { int ret = pthread_mutex_unlock(mutex); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_mutex_unlock : %s\n", strerror(ret)); STARPU_ABORT(); }}
+#define PTHREAD_MUTEX_INIT(mutex, attr) { int p_ret = pthread_mutex_init((mutex), (attr)); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_mutex_init: %s\n", strerror(p_ret)); STARPU_ABORT(); }}
+#define PTHREAD_MUTEX_DESTROY(mutex) { int p_ret = pthread_mutex_destroy(mutex); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_mutex_destroy: %s\n", strerror(p_ret)); STARPU_ABORT(); }}
+#define PTHREAD_MUTEX_LOCK(mutex) { int p_ret = pthread_mutex_lock(mutex); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_mutex_lock : %s\n", strerror(p_ret)); STARPU_ABORT(); }}
+#define PTHREAD_MUTEX_UNLOCK(mutex) { int p_ret = pthread_mutex_unlock(mutex); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_mutex_unlock : %s\n", strerror(p_ret)); STARPU_ABORT(); }}
 
-#define PTHREAD_RWLOCK_INIT(rwlock, attr) { int ret = pthread_rwlock_init((rwlock), (attr)); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_rwlock_init : %s\n", strerror(ret)); STARPU_ABORT();}}
-#define PTHREAD_RWLOCK_RDLOCK(rwlock) { int ret = pthread_rwlock_rdlock(rwlock); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_rwlock_rdlock : %s\n", strerror(ret)); STARPU_ABORT();}}
-#define PTHREAD_RWLOCK_WRLOCK(rwlock) { int ret = pthread_rwlock_wrlock(rwlock); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_rwlock_wrlock : %s\n", strerror(ret)); STARPU_ABORT();}}
-#define PTHREAD_RWLOCK_UNLOCK(rwlock) { int ret = pthread_rwlock_unlock(rwlock); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_rwlock_unlock : %s\n", strerror(ret)); STARPU_ABORT();}}
-#define PTHREAD_RWLOCK_DESTROY(rwlock) { int ret = pthread_rwlock_destroy(rwlock); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_rwlock_destroy : %s\n", strerror(ret)); STARPU_ABORT();}}
+#define PTHREAD_RWLOCK_INIT(rwlock, attr) { int p_ret = pthread_rwlock_init((rwlock), (attr)); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_rwlock_init : %s\n", strerror(p_ret)); STARPU_ABORT();}}
+#define PTHREAD_RWLOCK_RDLOCK(rwlock) { int p_ret = pthread_rwlock_rdlock(rwlock); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_rwlock_rdlock : %s\n", strerror(p_ret)); STARPU_ABORT();}}
+#define PTHREAD_RWLOCK_WRLOCK(rwlock) { int p_ret = pthread_rwlock_wrlock(rwlock); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_rwlock_wrlock : %s\n", strerror(p_ret)); STARPU_ABORT();}}
+#define PTHREAD_RWLOCK_UNLOCK(rwlock) { int p_ret = pthread_rwlock_unlock(rwlock); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_rwlock_unlock : %s\n", strerror(p_ret)); STARPU_ABORT();}}
+#define PTHREAD_RWLOCK_DESTROY(rwlock) { int p_ret = pthread_rwlock_destroy(rwlock); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_rwlock_destroy : %s\n", strerror(p_ret)); STARPU_ABORT();}}
 
-#define PTHREAD_COND_INIT(cond, attr) { int ret = pthread_cond_init((cond), (attr)); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_cond_init : %s\n", strerror(ret)); STARPU_ABORT();}}
-#define PTHREAD_COND_DESTROY(cond) { int ret = pthread_cond_destroy(cond); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_cond_destroy : %s\n", strerror(ret)); STARPU_ABORT();}}
-#define PTHREAD_COND_SIGNAL(cond) { int ret = pthread_cond_signal(cond); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_cond_signal : %s\n", strerror(ret)); STARPU_ABORT();}}
-#define PTHREAD_COND_BROADCAST(cond) { int ret = pthread_cond_broadcast(cond); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_cond_broadcast : %s\n", strerror(ret)); STARPU_ABORT();}}
-#define PTHREAD_COND_WAIT(cond, mutex) { int ret = pthread_cond_wait((cond), (mutex)); if (STARPU_UNLIKELY(ret)) { fprintf(stderr, "pthread_cond_wait : %s\n", strerror(ret)); STARPU_ABORT();}}
+#define PTHREAD_COND_INIT(cond, attr) { int p_ret = pthread_cond_init((cond), (attr)); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_cond_init : %s\n", strerror(p_ret)); STARPU_ABORT();}}
+#define PTHREAD_COND_DESTROY(cond) { int p_ret = pthread_cond_destroy(cond); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_cond_destroy : %s\n", strerror(p_ret)); STARPU_ABORT();}}
+#define PTHREAD_COND_SIGNAL(cond) { int p_ret = pthread_cond_signal(cond); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_cond_signal : %s\n", strerror(p_ret)); STARPU_ABORT();}}
+#define PTHREAD_COND_BROADCAST(cond) { int p_ret = pthread_cond_broadcast(cond); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_cond_broadcast : %s\n", strerror(p_ret)); STARPU_ABORT();}}
+#define PTHREAD_COND_WAIT(cond, mutex) { int p_ret = pthread_cond_wait((cond), (mutex)); if (STARPU_UNLIKELY(p_ret)) { fprintf(stderr, "pthread_cond_wait : %s\n", strerror(p_ret)); STARPU_ABORT();}}
 
 #endif // __COMMON_UTILS_H__

+ 6 - 3
src/core/dependencies/cg.c

@@ -94,7 +94,7 @@ void _starpu_notify_cg(starpu_cg_t *cg)
 
 		/* the group is now completed */
 		switch (cg->cg_type) {
-			case STARPU_CG_APPS:
+			case STARPU_CG_APPS: {
 				/* this is a cg for an application waiting on a set of
 	 			 * tags, wake the thread */
 				PTHREAD_MUTEX_LOCK(&cg->succ.succ_apps.cg_mutex);
@@ -102,8 +102,9 @@ void _starpu_notify_cg(starpu_cg_t *cg)
 				PTHREAD_COND_SIGNAL(&cg->succ.succ_apps.cg_cond);
 				PTHREAD_MUTEX_UNLOCK(&cg->succ.succ_apps.cg_mutex);
 				break;
+			}
 
-			case STARPU_CG_TAG:
+			case STARPU_CG_TAG: {
 				tag = cg->succ.tag;
 				tag_successors = &tag->tag_successors;
 	
@@ -117,8 +118,9 @@ void _starpu_notify_cg(starpu_cg_t *cg)
 					_starpu_tag_set_ready(tag);
 				}
 				break;
+			}
 
-			case STARPU_CG_TASK:
+ 		        case STARPU_CG_TASK: {
 				j = cg->succ.job;
 
 				job_successors = &j->job_successors;
@@ -135,6 +137,7 @@ void _starpu_notify_cg(starpu_cg_t *cg)
 				}
 
 				break;
+			}
 
 			default:
 				STARPU_ABORT();

+ 3 - 3
src/core/perfmodel/perfmodel_bus.c

@@ -923,7 +923,7 @@ static void check_bus_config_file()
                 f = fopen(path, "r");
                 STARPU_ASSERT(f);
                 _starpu_drop_comments(f);
-                ret = fscanf(f, "%d\t", &read_cpus);
+                ret = fscanf(f, "%u\t", &read_cpus);
 		STARPU_ASSERT(ret == 1);
                 _starpu_drop_comments(f);
 		ret = fscanf(f, "%d\t", &read_cuda);
@@ -945,7 +945,7 @@ static void check_bus_config_file()
 
                 // Checking if both configurations match
                 if (read_cpus != ncpus) {
-			fprintf(stderr, "Current configuration does not match the performance model (CPUS: (stored) %d != (current) %d), recalibrating...", read_cpus, ncpus);
+			fprintf(stderr, "Current configuration does not match the performance model (CPUS: (stored) %u != (current) %u), recalibrating...", read_cpus, ncpus);
                         starpu_force_bus_sampling();
 			fprintf(stderr, "done\n");
                 }
@@ -973,7 +973,7 @@ static void write_bus_config_file_content(void)
 	STARPU_ASSERT(f);
 
         fprintf(f, "# Current configuration\n");
-        fprintf(f, "%d # Number of CPUs\n", ncpus);
+        fprintf(f, "%u # Number of CPUs\n", ncpus);
         fprintf(f, "%d # Number of CUDA devices\n", ncuda);
         fprintf(f, "%d # Number of OpenCL devices\n", nopencl);
 

+ 1 - 1
src/core/task.c

@@ -274,7 +274,7 @@ void starpu_display_codelet_stats(struct starpu_codelet_t *cl)
 		char name[32];
 		starpu_worker_get_name(worker, name, 32);
 
-		fprintf(stderr, "\t%s -> %ld / %ld (%2.2f \%%)\n", name, cl->per_worker_stats[worker], total, (100.0f*cl->per_worker_stats[worker])/total);
+		fprintf(stderr, "\t%s -> %lu / %lu (%2.2f %%)\n", name, cl->per_worker_stats[worker], total, (100.0f*cl->per_worker_stats[worker])/total);
 	}
 }
 

+ 4 - 0
src/core/topology.c

@@ -190,19 +190,23 @@ static void _starpu_initialize_workers_gpuid(int use_explicit_workers_gpuid, int
 }
 #endif
 
+#ifdef STARPU_USE_CUDA
 static inline int _starpu_get_next_cuda_gpuid(struct starpu_machine_config_s *config)
 {
 	unsigned i = ((config->current_cuda_gpuid++) % config->topology.ncudagpus);
 
 	return (int)config->topology.workers_cuda_gpuid[i];
 }
+#endif
 
+#ifdef STARPU_USE_OPENCL
 static inline int _starpu_get_next_opencl_gpuid(struct starpu_machine_config_s *config)
 {
 	unsigned i = ((config->current_opencl_gpuid++) % config->topology.nopenclgpus);
 
 	return (int)config->topology.workers_opencl_gpuid[i];
 }
+#endif
 
 static void _starpu_init_topology(struct starpu_machine_config_s *config)
 {

+ 2 - 2
src/core/workers.c

@@ -309,7 +309,7 @@ static void _starpu_terminate_workers(struct starpu_machine_config_s *config)
 	{
 		starpu_wake_all_blocked_workers();
 		
-		_STARPU_DEBUG("wait for worker %d\n", workerid);
+		_STARPU_DEBUG("wait for worker %u\n", workerid);
 
 		struct starpu_worker_set_s *set = config->workers[workerid].set;
 		struct starpu_worker_s *worker = &config->workers[workerid];
@@ -353,7 +353,7 @@ unsigned _starpu_machine_is_running(void)
 	return config.running;
 }
 
-unsigned _starpu_worker_can_block(unsigned memnode)
+unsigned _starpu_worker_can_block(unsigned memnode __attribute__((unused)))
 {
 #ifdef STARPU_NON_BLOCKING_DRIVERS
 	return 0;

+ 1 - 0
src/drivers/driver_common/driver_common.c

@@ -20,6 +20,7 @@
 #include <profiling/profiling.h>
 #include <common/utils.h>
 #include <core/debug.h>
+#include <drivers/driver_common/driver_common.h>
 
 void _starpu_driver_update_job_feedback(starpu_job_t j, struct starpu_worker_s *worker_args,
 					struct starpu_task_profiling_info *profiling_info,

+ 89 - 89
src/profiling/bound.c

@@ -391,25 +391,25 @@ void starpu_bound_print_lp(FILE *output)
 	nw = starpu_worker_get_count();
 
 	if (recorddeps) {
-		struct bound_task *t, *t2;
+		struct bound_task *t1, *t2;
 		struct bound_tag_dep *td;
 		int i;
 
 		nt = 0;
-		for (t = tasks; t; t = t->next) {
+		for (t1 = tasks; t1; t1 = t1->next) {
 			struct starpu_job_s j = {
-				.footprint = t->footprint,
+				.footprint = t1->footprint,
 				.footprint_is_computed = 1,
 			};
 			for (w = 0; w < nw; w++) {
 				enum starpu_perf_archtype arch = starpu_worker_get_perf_archtype(w);
-				if (t->duration[arch] == 0.) {
-					double length = _starpu_history_based_job_expected_length(t->cl->model, arch, &j);
+				if (t1->duration[arch] == 0.) {
+					double length = _starpu_history_based_job_expected_length(t1->cl->model, arch, &j);
 					if (length == -1.0)
 						/* Avoid problems with binary coding of doubles */
-						t->duration[arch] = -1.0;
+						t1->duration[arch] = -1.0;
 					else
-						t->duration[arch] = length / 1000.;
+						t1->duration[arch] = length / 1000.;
 				}
 			}
 			nt++;
@@ -420,42 +420,42 @@ void starpu_bound_print_lp(FILE *output)
 		fprintf(output, "min: tmax;\n\n");
 
 		fprintf(output, "/* Which is the maximum of all task completion times (ms) */\n");
-		for (t = tasks; t; t = t->next)
-			fprintf(output, "c%lu <= tmax;\n", t->id);
+		for (t1 = tasks; t1; t1 = t1->next)
+			fprintf(output, "c%lu <= tmax;\n", t1->id);
 
 		fprintf(output, "\n/* We have tasks executing on workers, exactly one worker executes each task */\n");
-		for (t = tasks; t; t = t->next) {
+		for (t1 = tasks; t1; t1 = t1->next) {
 			for (w = 0; w < nw; w++) {
 				enum starpu_perf_archtype arch = starpu_worker_get_perf_archtype(w);
-				if (t->duration[arch] != -1.0)
-					fprintf(output, " +t%luw%u", t->id, w);
+				if (t1->duration[arch] != -1.0)
+					fprintf(output, " +t%luw%d", t1->id, w);
 			}
 			fprintf(output, " = 1;\n");
 		}
 
 		fprintf(output, "\n/* Completion time is start time plus computation time */\n");
 		fprintf(output, "/* According to where the task is indeed executed */\n");
-		for (t = tasks; t; t = t->next) {
-			fprintf(output, "/* %s %x */\tc%lu = s%lu", t->cl->model->symbol, (unsigned) t->footprint, t->id, t->id);
+		for (t1 = tasks; t1; t1 = t1->next) {
+			fprintf(output, "/* %s %x */\tc%lu = s%lu", t1->cl->model->symbol, (unsigned) t1->footprint, t1->id, t1->id);
 			for (w = 0; w < nw; w++) {
 				enum starpu_perf_archtype arch = starpu_worker_get_perf_archtype(w);
-				if (t->duration[arch] != -1.0)
-					fprintf(output, " + %f t%luw%u", t->duration[arch], t->id, w);
+				if (t1->duration[arch] != -1.0)
+					fprintf(output, " + %f t%luw%d", t1->duration[arch], t1->id, w);
 			}
 			fprintf(output, ";\n");
 		}
 
 		fprintf(output, "\n/* Each task starts after all its task dependencies finish. */\n");
 		fprintf(output, "/* Note that the dependency finish time depends on the worker where it's working */\n");
-		for (t = tasks; t; t = t->next)
-			for (i = 0; i < t->depsn; i++)
-				fprintf(output, "s%lu >= c%lu;\n", t->id, t->deps[i]->id);
+		for (t1 = tasks; t1; t1 = t1->next)
+			for (i = 0; i < t1->depsn; i++)
+				fprintf(output, "s%lu >= c%lu;\n", t1->id, t1->deps[i]->id);
 
 		fprintf(output, "\n/* Each tag finishes when its corresponding task finishes */");
-		for (t = tasks; t; t = t->next)
-			if (t->use_tag) {
+		for (t1 = tasks; t1; t1 = t1->next)
+			if (t1->use_tag) {
 				for (w = 0; w < nw; w++)
-					fprintf(output, "c%lu = tag%lu;\n", t->id, (unsigned long) t->tag_id);
+					fprintf(output, "c%lu = tag%lu;\n", t1->id, (unsigned long) t1->tag_id);
 			}
 
 		fprintf(output, "\n/* tags start after all their tag dependencies finish. */\n");
@@ -465,17 +465,17 @@ void starpu_bound_print_lp(FILE *output)
 /* TODO: factorize ancestor calls */
 		fprintf(output, "\n/* For each task pair and each worker, if both tasks are executed by the same worker,\n");
 		fprintf(output, "   one is started after the other's completion */\n");
-		for (t = tasks; t; t = t->next) {
-			for (t2 = t->next; t2; t2 = t2->next)
+		for (t1 = tasks; t1; t1 = t1->next) {
+			for (t2 = t1->next; t2; t2 = t2->next)
 			{
-				if (!ancestor(t, t2) && !ancestor(t2, t)) {
+				if (!ancestor(t1, t2) && !ancestor(t2, t1)) {
 					for (w = 0; w < nw; w++) {
 						enum starpu_perf_archtype arch = starpu_worker_get_perf_archtype(w);
-						if (t->duration[arch] != -1.0) {
-							fprintf(output, "s%lu - c%lu >= -3e5 + 1e5 t%luw%u + 1e5 t%luw%u + 1e5 t%luafter%lu;\n",
-									t->id, t2->id, t->id, w, t2->id, w, t->id, t2->id);
-							fprintf(output, "s%lu - c%lu >= -2e5 + 1e5 t%luw%u + 1e5 t%luw%u - 1e5 t%luafter%lu;\n",
-									t2->id, t->id, t->id, w, t2->id, w, t->id, t2->id);
+						if (t1->duration[arch] != -1.0) {
+							fprintf(output, "s%lu - c%lu >= -3e5 + 1e5 t%luw%d + 1e5 t%luw%d + 1e5 t%luafter%lu;\n",
+									t1->id, t2->id, t1->id, w, t2->id, w, t1->id, t2->id);
+							fprintf(output, "s%lu - c%lu >= -2e5 + 1e5 t%luw%d + 1e5 t%luw%d - 1e5 t%luafter%lu;\n",
+									t2->id, t1->id, t1->id, w, t2->id, w, t1->id, t2->id);
 						}
 					}
 				}
@@ -484,70 +484,70 @@ void starpu_bound_print_lp(FILE *output)
 
 #if 0
 /* Doesn't help at all to actually express what "after" means */
-		for (t = tasks; t; t = t->next)
-			for (t2 = t->next; t2; t2 = t2->next)
-				if (!ancestor(t, t2) && !ancestor(t2, t))
+		for (t1 = tasks; t1; t1 = t1->next)
+			for (t2 = t1->next; t2; t2 = t2->next)
+				if (!ancestor(t1, t2) && !ancestor(t2, t1))
 				{
-					fprintf(output, "s%lu - s%lu >= -1e5 + 1e5 t%luafter%lu;\n", t->id, t2->id, t->id, t2->id);
-					fprintf(output, "s%lu - s%lu >= -1e5 t%luafter%lu;\n", t2->id, t->id, t->id, t2->id);
+					fprintf(output, "s%lu - s%lu >= -1e5 + 1e5 t%luafter%lu;\n", t1->id, t2->id, t1->id, t2->id);
+					fprintf(output, "s%lu - s%lu >= -1e5 t%luafter%lu;\n", t2->id, t1->id, t1->id, t2->id);
 				}
 #endif
 
 		if (recordprio) {
 			fprintf(output, "\n/* For StarPU, a priority means given schedulable tasks it will consider the\n");
 			fprintf(output, " * more prioritized first */\n");
-			for (t = tasks; t; t = t->next) {
-				for (t2 = t->next; t2; t2 = t2->next)
+			for (t1 = tasks; t1; t1 = t1->next) {
+				for (t2 = t1->next; t2; t2 = t2->next)
 				{
-					if (!ancestor(t, t2) && !ancestor(t2, t)
-					     && t->priority != t2->priority) {
-						if (t->priority > t2->priority) {
-							/* Either t2 is scheduled before t, but then it
+					if (!ancestor(t1, t2) && !ancestor(t2, t1)
+					     && t1->priority != t2->priority) {
+						if (t1->priority > t2->priority) {
+							/* Either t2 is scheduled before t1, but then it
 							   needs to be scheduled before some t dep finishes */
 
-							/* One of the t deps to give the maximum start time for t2 */
-							if (t->depsn > 1) {
-								for (i = 0; i < t->depsn; i++)
-									fprintf(output, " + t%lut%lud%u", t2->id, t->id, i);
+							/* One of the t1 deps to give the maximum start time for t2 */
+							if (t1->depsn > 1) {
+								for (i = 0; i < t1->depsn; i++)
+									fprintf(output, " + t%lut%lud%d", t2->id, t1->id, i);
 								fprintf(output, " = 1;\n");
 							}
 
-							for (i = 0; i < t->depsn; i++) {
-								fprintf(output, "c%lu - s%lu >= ", t->deps[i]->id, t2->id);
-								if (t->depsn > 1)
+							for (i = 0; i < t1->depsn; i++) {
+								fprintf(output, "c%lu - s%lu >= ", t1->deps[i]->id, t2->id);
+								if (t1->depsn > 1)
 									/* Only checks this when it's this dependency that is chosen */
-									fprintf(output, "-2e5 + 1e5 t%lut%lud%u", t2->id, t->id, i);
+									fprintf(output, "-2e5 + 1e5 t%lut%lud%d", t2->id, t1->id, i);
 								else
 									fprintf(output, "-1e5");
-								/* Only check this if t is after t2 */
-								fprintf(output, " + 1e5 t%luafter%lu", t->id, t2->id);
+								/* Only check this if t1 is after t2 */
+								fprintf(output, " + 1e5 t%luafter%lu", t1->id, t2->id);
 								fprintf(output, ";\n");
 							}
 
-							/* Or t2 is scheduled after t is.  */
-							fprintf(output, "s%lu - s%lu >= -1e5 t%luafter%lu;\n", t2->id, t->id, t->id, t2->id);
+							/* Or t2 is scheduled after t1 is.  */
+							fprintf(output, "s%lu - s%lu >= -1e5 t%luafter%lu;\n", t2->id, t1->id, t1->id, t2->id);
 						} else {
-							/* Either t is scheduled before t2, but then it
+							/* Either t1 is scheduled before t2, but then it
 							   needs to be scheduled before some t2 dep finishes */
 
-							/* One of the t2 deps to give the maximum start time for t */
+							/* One of the t2 deps to give the maximum start time for t1 */
 							if (t2->depsn > 1) {
 								for (i = 0; i < t2->depsn; i++)
-									fprintf(output, " + t%lut%lud%u", t->id, t2->id, i);
+									fprintf(output, " + t%lut%lud%d", t1->id, t2->id, i);
 								fprintf(output, " = 1;\n");
 							}
 
 							for (i = 0; i < t2->depsn; i++) {
-								fprintf(output, "c%lu - s%lu >= ", t2->deps[i]->id, t->id);
+								fprintf(output, "c%lu - s%lu >= ", t2->deps[i]->id, t1->id);
 								if (t2->depsn > 1)
 									/* Only checks this when it's this dependency that is chosen */
-									fprintf(output, "-1e5 + 1e5 t%lut%lud%u", t->id, t2->id, i);
-								/* Only check this if t2 is after t */
-								fprintf(output, " - 1e5 t%luafter%lu;\n", t->id, t2->id);
+									fprintf(output, "-1e5 + 1e5 t%lut%lud%d", t1->id, t2->id, i);
+								/* Only check this if t2 is after t1 */
+								fprintf(output, " - 1e5 t%luafter%lu;\n", t1->id, t2->id);
 							}
 
-							/* Or t is scheduled after t2 is.  */
-							fprintf(output, "s%lu - s%lu >= -1e5 + 1e5 t%luafter%lu;\n", t->id, t2->id, t->id, t2->id);
+							/* Or t1 is scheduled after t2 is.  */
+							fprintf(output, "s%lu - s%lu >= -1e5 + 1e5 t%luafter%lu;\n", t1->id, t2->id, t1->id, t2->id);
 						}
 					}
 				}
@@ -555,26 +555,26 @@ void starpu_bound_print_lp(FILE *output)
 		}
 
 
-		for (t = tasks; t; t = t->next)
-			for (t2 = t->next; t2; t2 = t2->next)
-				if (!ancestor(t, t2) && !ancestor(t2, t)) {
-					fprintf(output, "bin t%luafter%lu;\n", t->id, t2->id);
-					if (recordprio && t->priority != t2->priority) {
-						if (t->priority > t2->priority) {
-							if (t->depsn > 1)
-								for (i = 0; i < t->depsn; i++)
-									fprintf(output, "bin t%lut%lud%u;\n", t2->id, t->id, i);
+		for (t1 = tasks; t1; t1 = t1->next)
+			for (t2 = t1->next; t2; t2 = t2->next)
+				if (!ancestor(t1, t2) && !ancestor(t2, t1)) {
+					fprintf(output, "bin t%luafter%lu;\n", t1->id, t2->id);
+					if (recordprio && t1->priority != t2->priority) {
+						if (t1->priority > t2->priority) {
+							if (t1->depsn > 1)
+								for (i = 0; i < t1->depsn; i++)
+									fprintf(output, "bin t%lut%lud%d;\n", t2->id, t1->id, i);
 						} else {
 							if (t2->depsn > 1)
 								for (i = 0; i < t2->depsn; i++)
-									fprintf(output, "bin t%lut%lud%u;\n", t->id, t2->id, i);
+									fprintf(output, "bin t%lut%lud%d;\n", t1->id, t2->id, i);
 						}
 					}
 				}
 
-		for (t = tasks; t; t = t->next)
+		for (t1 = tasks; t1; t1 = t1->next)
 			for (w = 0; w < nw; w++)
-				fprintf(output, "bin t%luw%u;\n", t->id, w);
+				fprintf(output, "bin t%luw%d;\n", t1->id, w);
 	} else {
 		struct bound_task_pool *tp;
 		nt = 0;
@@ -597,7 +597,7 @@ void starpu_bound_print_lp(FILE *output)
 				fprintf(output, "/* worker %s */\n", name);
 				for (t = 0, tp = task_pools; tp; t++, tp = tp->next) {
 					if (times[w][t] != -1.0)
-						fprintf(output, "\t%+f * w%ut%un", (float) times[w][t], w, t);
+						fprintf(output, "\t%+f * w%dt%dn", (float) times[w][t], w, t);
 				}
 				fprintf(output, " <= tmax;\n");
 			}
@@ -608,12 +608,12 @@ void starpu_bound_print_lp(FILE *output)
 				fprintf(output, "/* task %s key %x */\n", tp->cl->model->symbol, (unsigned) tp->footprint);
 				for (w = 0; w < nw; w++)
 					if (times[w][t] != -1.0)
-						fprintf(output, "\t+w%ut%un", w, t);
-				fprintf(output, " = %ld;\n", tp->n);
+						fprintf(output, "\t+w%dt%dn", w, t);
+				fprintf(output, " = %lu;\n", tp->n);
 				/* Show actual values */
 				fprintf(output, "/*");
 				for (w = 0; w < nw; w++)
-					fprintf(output, "\t+%ld", tp->cl->per_worker_stats[w]);
+					fprintf(output, "\t+%lu", tp->cl->per_worker_stats[w]);
 				fprintf(output, "\t*/\n\n");
 			}
 
@@ -626,7 +626,7 @@ void starpu_bound_print_lp(FILE *output)
 						fprintf(output, ",");
 					else
 						first = 0;
-					fprintf(output, "w%ut%un", w, t);
+					fprintf(output, "w%dt%dn", w, t);
 				}
 			fprintf(output, "; */\n");
 		}
@@ -674,13 +674,13 @@ void starpu_bound_print_mps(FILE *output)
 			char name[32];
 			starpu_worker_get_name(w, name, sizeof(name));
 			fprintf(output, "* worker %s\n", name);
-			fprintf(output, " L  W%u\n", w);
+			fprintf(output, " L  W%d\n", w);
 		}
 
 		fprintf(output, "\n* And we have to have computed exactly all tasks\n");
 		for (t = 0, tp = task_pools; tp; t++, tp = tp->next) {
 			fprintf(output, "* task %s key %x\n", tp->cl->model->symbol, (unsigned) tp->footprint);
-			fprintf(output, " E  T%u\n", t);
+			fprintf(output, " E  T%d\n", t);
 		}
 
 		fprintf(output, "\nCOLUMNS\n");
@@ -690,21 +690,21 @@ void starpu_bound_print_mps(FILE *output)
 			for (t = 0, tp = task_pools; tp; t++, tp = tp->next)
 				if (times[w][t] != -1.0) {
 					char name[9];
-					snprintf(name, sizeof(name), "W%uT%u", w, t);
-					fprintf(stderr,"    %-8s  W%-7u  %12f\n", name, w, times[w][t]);
-					fprintf(stderr,"    %-8s  T%-7u  %12u\n", name, t, 1);
+					snprintf(name, sizeof(name), "W%dT%d", w, t);
+					fprintf(stderr,"    %-8s  W%-7d  %12f\n", name, w, times[w][t]);
+					fprintf(stderr,"    %-8s  T%-7d  %12d\n", name, t, 1);
 				}
 
 		fprintf(output, "\n* Total execution time\n");
 		for (w = 0; w < nw; w++)
-			fprintf(stderr,"    TMAX      W%-2u       %12u\n", w, -1);
-		fprintf(stderr,"    TMAX      TMAX      %12u\n", 1);
+			fprintf(stderr,"    TMAX      W%-2d       %12d\n", w, -1);
+		fprintf(stderr,"    TMAX      TMAX      %12d\n", 1);
 
 		fprintf(output, "\nRHS\n");
 
 		fprintf(output, "\n* Total number of tasks\n");
 		for (t = 0, tp = task_pools; tp; t++, tp = tp->next)
-			fprintf(stderr,"    NT%-2u      T%-7u  %12lu\n", t, t, tp->n);
+			fprintf(stderr,"    NT%-2d      T%-7d  %12lu\n", t, t, tp->n);
 
 		fprintf(output, "ENDATA\n");
 	}
@@ -828,7 +828,7 @@ static glp_prob *_starpu_bound_glp_resolve(int integer)
 }
 #endif /* HAVE_GLPK_H */
 
-void starpu_bound_print(FILE *output, int integer) {
+void starpu_bound_print(FILE *output, int integer __attribute__ ((unused))) {
 #ifdef HAVE_GLPK_H
 	if (recorddeps) {
 		fprintf(output, "Not supported\n");
@@ -872,7 +872,7 @@ void starpu_bound_print(FILE *output, int integer) {
 #endif /* HAVE_GLPK_H */
 }
 
-void starpu_bound_compute(double *res, double *integer_res, int integer) {
+void starpu_bound_compute(double *res, double *integer_res __attribute__ ((unused)), int integer __attribute__ ((unused))) {
 #ifdef HAVE_GLPK_H
 	double ret;
 

+ 1 - 1
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -62,7 +62,7 @@ static int count_non_ready_buffers(struct starpu_task *task, uint32_t node)
 	return cnt;
 }
 
-struct starpu_task *_starpu_fifo_pop_first_ready_task(struct starpu_fifo_taskq_s *fifo_queue, unsigned node)
+static struct starpu_task *_starpu_fifo_pop_first_ready_task(struct starpu_fifo_taskq_s *fifo_queue, unsigned node)
 {
 	struct starpu_task *task = NULL, *current;
 

+ 1 - 1
src/sched_policies/deque_queues.c

@@ -56,7 +56,7 @@ unsigned _starpu_get_deque_nprocessed(struct starpu_deque_jobq_s *deque_queue)
 	return deque_queue->nprocessed;
 }
 
-struct starpu_task *_starpu_deque_pop_task(struct starpu_deque_jobq_s *deque_queue, int workerid)
+struct starpu_task *_starpu_deque_pop_task(struct starpu_deque_jobq_s *deque_queue, int workerid __attribute__ ((unused)))
 {
 	starpu_job_t j = NULL;
 

+ 1 - 1
src/sched_policies/eager_central_priority_policy.c

@@ -91,7 +91,7 @@ static void initialize_eager_center_priority_policy(struct starpu_machine_topolo
 		starpu_worker_set_sched_condition(workerid, &global_sched_cond, &global_sched_mutex);
 }
 
-static void deinitialize_eager_center_priority_policy(struct starpu_machine_topology_s *topology,
+static void deinitialize_eager_center_priority_policy(struct starpu_machine_topology_s *topology __attribute__ ((unused)),
 		   __attribute__ ((unused)) struct starpu_sched_policy_s *_policy) 
 {
 	/* TODO check that there is no task left in the queue */

+ 1 - 1
src/sched_policies/fifo_queues.c

@@ -75,7 +75,7 @@ int _starpu_fifo_push_task(struct starpu_fifo_taskq_s *fifo_queue, pthread_mutex
 	return 0;
 }
 
-struct starpu_task *_starpu_fifo_pop_task(struct starpu_fifo_taskq_s *fifo_queue, int workerid)
+struct starpu_task *_starpu_fifo_pop_task(struct starpu_fifo_taskq_s *fifo_queue, int workerid __attribute__ ((unused)))
 {
 	struct starpu_task *task = NULL;
 

+ 1 - 6
src/sched_policies/stack_queues.c

@@ -46,11 +46,6 @@ struct starpu_stack_jobq_s *_starpu_create_stack(void)
 	return stack;
 }
 
-unsigned get_total_njobs_stacks(void)
-{
-	return total_number_of_jobs;
-}
-
 unsigned _starpu_get_stack_njobs(struct starpu_stack_jobq_s *stack_queue)
 {
 	return stack_queue->njobs;
@@ -89,7 +84,7 @@ void _starpu_stack_push_task(struct starpu_stack_jobq_s *stack_queue, pthread_mu
 	PTHREAD_MUTEX_UNLOCK(sched_mutex);
 }
 
-starpu_job_t _starpu_stack_pop_task(struct starpu_stack_jobq_s *stack_queue, pthread_mutex_t *sched_mutex, int workerid)
+starpu_job_t _starpu_stack_pop_task(struct starpu_stack_jobq_s *stack_queue, pthread_mutex_t *sched_mutex, int workerid __attribute__ ((unused)))
 {
 	starpu_job_t j = NULL;
 

+ 1 - 0
src/util/file.c

@@ -15,6 +15,7 @@
  */
 
 #include <starpu.h>
+#include <common/utils.h>
 
 void _starpu_drop_comments(FILE *f)
 {

+ 1 - 1
tests/microbenchs/local_pingpong.c

@@ -22,7 +22,7 @@
 
 static size_t vector_size = 1;
 
-static niter = 1000;
+static int niter = 1000;
 static unsigned cnt;
 
 static unsigned finished = 0;