[sheepdog] [PATCH v2] employ gnu99 style of GCC

MORITA Kazutaka morita.kazutaka at gmail.com
Tue Apr 30 08:23:28 CEST 2013


At Mon, 29 Apr 2013 23:36:21 +0900,
Hitoshi Mitake wrote:
> 
> This patch lets sheepdog employ gnu99 (C99 + gnu extensions) style of
> GCC. The main benefit of gnu99 is allowing interleaved statements and
> declarations. sheepdog source tree has many functions with lots of
> local variable declarations on their head part. They are harmful from
> the perspective of readability. Basically, variable declarations
> should be delayed until they are actually required. With gnu99, we can
> write interleaved statements and declarations, so this can improve the
> readability of sheepdog.
> 
> The RB_ROOT constant is not friendly with gnu99, so this patch also
> add a minor change to it. In addition, RB_ROOT cannot be used in
> statements (not declarations). This patch also prepares a new macro
> INIT_RB_ROOT() for such usecases.
> 
> Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> ---
>  configure.ac         |    2 +-
>  include/rbtree.h     |    7 ++++++-
>  sheep/object_cache.c |    2 +-
>  3 files changed, 8 insertions(+), 3 deletions(-)

Applied, thanks!

Kazutaka



More information about the sheepdog mailing list