Threads count being defaulted to 0 (autodetect), and --disable-pthreads build checking that thread count==1, there were spurious warnings about threads being ignored, despite not specified on command line/conf. Fixes tests 5521 and 5526 that were broken in --disable-pthreads builds because of those warnings. Signed-off-by: Etienne Buira <etienne.buira@xxxxxxxxx> --- builtin/pack-objects.c | 2 +- thread-utils.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index b59f5d8..7b51453 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -51,7 +51,7 @@ static int progress = 1; static int window = 10; static unsigned long pack_size_limit; static int depth = 50; -static int delta_search_threads; +static int delta_search_threads = THREAD_COMPAT_DEFAULT_THREAD_NBR; static int pack_to_stdout; static int num_preferred_base; static struct progress *progress_state; diff --git a/thread-utils.h b/thread-utils.h index 6fb98c3..4f5e802 100644 --- a/thread-utils.h +++ b/thread-utils.h @@ -7,5 +7,8 @@ extern int online_cpus(void); extern int init_recursive_mutex(pthread_mutex_t*); +#define THREAD_COMPAT_DEFAULT_THREAD_NBR 0 +#else +#define THREAD_COMPAT_DEFAULT_THREAD_NBR 1 #endif #endif /* THREAD_COMPAT_H */ -- 1.8.5.5 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html