This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

Eliminate crtstuff.c warnings


Howdy,

crtstuff.c generates the following warnings:

 ../../gcc/gcc/crtstuff.c: In function `__do_global_dtors_aux':
 ../../gcc/gcc/crtstuff.c:282: warning: passing arg 1 of `__deregister_frame_info' discards qualifiers from pointer target type
 ../../gcc/gcc/crtstuff.c: In function `frame_dummy':
 ../../gcc/gcc/crtstuff.c:310: warning: passing arg 1 of `__register_frame_info' discards qualifiers from pointer target type

The appended patch eliminates them by casting the first argument
of each call to void *.

Bootstrapped and regression tested on powerpc-unknown-linux-gnu.

OK to commit?

-- 
Matt Kraai          kraai@alumni.cmu.edu          Debian GNU/Linux

	* crtstuff.c (__do_global_dtors_aux, frame_dummy): Cast
	__EH_FRAME_BEGIN__ to a void *.

Index: gcc/crtstuff.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/crtstuff.c,v
retrieving revision 1.62
diff -3 -c -p -r1.62 crtstuff.c
*** gcc/crtstuff.c	7 Jun 2003 17:30:32 -0000	1.62
--- gcc/crtstuff.c	1 Jul 2003 03:25:00 -0000
*************** __do_global_dtors_aux (void)
*** 279,285 ****
      __deregister_frame_info_bases (__EH_FRAME_BEGIN__);
  #else
    if (__deregister_frame_info)
!     __deregister_frame_info (__EH_FRAME_BEGIN__);
  #endif
  #endif
  
--- 279,285 ----
      __deregister_frame_info_bases (__EH_FRAME_BEGIN__);
  #else
    if (__deregister_frame_info)
!     __deregister_frame_info ((void *) __EH_FRAME_BEGIN__);
  #endif
  #endif
  
*************** frame_dummy (void)
*** 307,313 ****
      __register_frame_info_bases (__EH_FRAME_BEGIN__, &object, tbase, dbase);
  #else
    if (__register_frame_info)
!     __register_frame_info (__EH_FRAME_BEGIN__, &object);
  #endif /* CRT_GET_RFIB_DATA */
  #endif /* USE_EH_FRAME_REGISTRY */
  #ifdef JCR_SECTION_NAME
--- 307,313 ----
      __register_frame_info_bases (__EH_FRAME_BEGIN__, &object, tbase, dbase);
  #else
    if (__register_frame_info)
!     __register_frame_info ((void *) __EH_FRAME_BEGIN__, &object);
  #endif /* CRT_GET_RFIB_DATA */
  #endif /* USE_EH_FRAME_REGISTRY */
  #ifdef JCR_SECTION_NAME


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