summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d72963e)
Sync with [1].
In particular, this lets us configure with -Wunused-but-set-parameter.
[1] https://raw.githubusercontent.com/autoconf-archive/autoconf-archive/
62e8491dbc174113a04fe910cad1e92e8a9e2164/m4/ax_pthread.m4
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Change-Id: Id9a6eb7cd0b8c7597ae6abb5587078afdaa420f6
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
# if $ax_pthread_check_cond
# error "$ax_pthread_check_macro must be defined"
# endif
# if $ax_pthread_check_cond
# error "$ax_pthread_check_macro must be defined"
# endif
- static void routine(void *a) { a = 0; }
+ static void *some_global = NULL;
+ static void routine(void *a)
+ {
+ /* To avoid any unused-parameter or
+ unused-but-set-parameter warning. */
+ some_global = a;
+ }
static void *start_routine(void *a) { return a; }],
[pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0);
static void *start_routine(void *a) { return a; }],
[pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0);