diff mbox

[4/7] Fix _IO_JUMPS_OFFSET -Wundef warnings

Message ID 1395059004-20960-4-git-send-email-will.newton@linaro.org
State Rejected
Headers show

Commit Message

Will Newton March 17, 2014, 12:23 p.m. UTC
ChangeLog:

2014-03-17  Will Newton  <will.newton@linaro.org>

	* libio/genops.c: Check whether
	_IO_JUMPS_OFFSET is defined with #ifdef rather
	than #if.
	* libio/libioP.h: Likewise.
	* stdio-common/vfprintf.c: Likewise.
---
 libio/genops.c          | 2 +-
 libio/libioP.h          | 2 +-
 stdio-common/vfprintf.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Siddhesh Poyarekar March 17, 2014, 1:53 p.m. UTC | #1
On 17 March 2014 17:53, Will Newton <will.newton@linaro.org> wrote:
> ChangeLog:
>
> 2014-03-17  Will Newton  <will.newton@linaro.org>
>
>         * libio/genops.c: Check whether
>         _IO_JUMPS_OFFSET is defined with #ifdef rather
>         than #if.
>         * libio/libioP.h: Likewise.
>         * stdio-common/vfprintf.c: Likewise.
> ---
>  libio/genops.c          | 2 +-
>  libio/libioP.h          | 2 +-
>  stdio-common/vfprintf.c | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/libio/genops.c b/libio/genops.c
> index e0ce8cc..42efe58 100644
> --- a/libio/genops.c
> +++ b/libio/genops.c
> @@ -624,7 +624,7 @@ _IO_old_init (fp, flags)
>    fp->_IO_save_end = NULL;
>    fp->_markers = NULL;
>    fp->_cur_column = 0;
> -#if _IO_JUMPS_OFFSET
> +#ifdef _IO_JUMPS_OFFSET
>    fp->_vtable_offset = 0;
>  #endif
>  #ifdef _IO_MTSAFE_IO
> diff --git a/libio/libioP.h b/libio/libioP.h
> index 8a7b85b..a59e95d 100644
> --- a/libio/libioP.h
> +++ b/libio/libioP.h
> @@ -106,7 +106,7 @@ extern "C" {
>  #define _IO_WIDE_JUMPS(THIS) ((struct _IO_FILE *) (THIS))->_wide_data->_wide_vtable
>  #define _IO_CHECK_WIDE(THIS) (((struct _IO_FILE *) (THIS))->_wide_data != NULL)
>
> -#if _IO_JUMPS_OFFSET
> +#ifdef _IO_JUMPS_OFFSET
>  # define _IO_JUMPS_FUNC(THIS) \
>   (*(struct _IO_jump_t **) ((void *) &_IO_JUMPS ((struct _IO_FILE_plus *) (THIS)) \
>                            + (THIS)->_vtable_offset))
> diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
> index f7e5f61..70cdba4 100644
> --- a/stdio-common/vfprintf.c
> +++ b/stdio-common/vfprintf.c
> @@ -2297,7 +2297,7 @@ buffered_vfprintf (_IO_FILE *s, const CHAR_T *format,
>    hp->_mode = -1;
>  #endif
>    hp->_IO_file_flags = _IO_MAGIC|_IO_NO_READS|_IO_USER_LOCK;
> -#if _IO_JUMPS_OFFSET
> +#ifdef _IO_JUMPS_OFFSET
>    hp->_vtable_offset = 0;
>  #endif
>  #ifdef _IO_MTSAFE_IO
> --
> 1.8.1.4
>

Looks OK to me.

Siddhesh
diff mbox

Patch

diff --git a/libio/genops.c b/libio/genops.c
index e0ce8cc..42efe58 100644
--- a/libio/genops.c
+++ b/libio/genops.c
@@ -624,7 +624,7 @@  _IO_old_init (fp, flags)
   fp->_IO_save_end = NULL;
   fp->_markers = NULL;
   fp->_cur_column = 0;
-#if _IO_JUMPS_OFFSET
+#ifdef _IO_JUMPS_OFFSET
   fp->_vtable_offset = 0;
 #endif
 #ifdef _IO_MTSAFE_IO
diff --git a/libio/libioP.h b/libio/libioP.h
index 8a7b85b..a59e95d 100644
--- a/libio/libioP.h
+++ b/libio/libioP.h
@@ -106,7 +106,7 @@  extern "C" {
 #define _IO_WIDE_JUMPS(THIS) ((struct _IO_FILE *) (THIS))->_wide_data->_wide_vtable
 #define _IO_CHECK_WIDE(THIS) (((struct _IO_FILE *) (THIS))->_wide_data != NULL)
 
-#if _IO_JUMPS_OFFSET
+#ifdef _IO_JUMPS_OFFSET
 # define _IO_JUMPS_FUNC(THIS) \
  (*(struct _IO_jump_t **) ((void *) &_IO_JUMPS ((struct _IO_FILE_plus *) (THIS)) \
 			   + (THIS)->_vtable_offset))
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index f7e5f61..70cdba4 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -2297,7 +2297,7 @@  buffered_vfprintf (_IO_FILE *s, const CHAR_T *format,
   hp->_mode = -1;
 #endif
   hp->_IO_file_flags = _IO_MAGIC|_IO_NO_READS|_IO_USER_LOCK;
-#if _IO_JUMPS_OFFSET
+#ifdef _IO_JUMPS_OFFSET
   hp->_vtable_offset = 0;
 #endif
 #ifdef _IO_MTSAFE_IO