This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING][PATCH] Fix build warning in pthread_rwlock_*

> I ran an automated checker and it holds for nptl code in general. Here
> is patch that fixes obvious parts of what I found.

Maybe you can write something up on the wiki about what methods you used to
check and how people can do that again.

> -    if (! dtv[1 + cnt].pointer.is_static
> +    if (!dtv[1 + cnt].pointer.is_static

We don't have a clear rule about (! foo) vs (!foo) and I don't find either
one particularly bothersome.  So I'm inclined to avoid the churn of changes
just for that.  That looks like be a lot of the lines touched here.

>  #else
> -#define __set_futex_clock_realtime() do { } while (0)
> +# define __set_futex_clock_realtime() do { } while (0)
>  #endif

All these sorts of ones can go under the "obvious enough" rule any time.
I'd say the same for leading spaces->tabs.

>    if (!(USE_REQUEUE_PI (cbuffer->mutex))
>        || ((cbuffer->mutex->__data.__lock & FUTEX_TID_MASK)
> -  {
> -    __pthread_mutex_cond_lock (cbuffer->mutex);
> -  }
> +    {
> +      __pthread_mutex_cond_lock (cbuffer->mutex);
> +    }
>    else
>      __pthread_mutex_cond_lock_adjust (cbuffer->mutex);

Here you should just drop the superfluous braces too.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]