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]

[patch i386 windows]: Fix const type issue about find_slot


Hi,

this patch fixes a reported issue for windows targets in winnt.c.
This is a classical C++ related warning issue.

ChangeLog

2013-11-26  Kai Tietz  <ktietz@redhat.com>

        * config/i386/winnt.c (i386_pe_section_type_flags): Use const
        pointer cast.

I will apply soon, if there are no objections.

Regards,
Kai

Index: winnt.c
===================================================================
--- winnt.c     (Revision 204901)
+++ winnt.c     (Arbeitskopie)
@@ -486,7 +486,7 @@ i386_pe_section_type_flags (tree decl, const char
     flags |= SECTION_LINKONCE;

   /* See if we already have an entry for this section.  */
-  slot = htab.find_slot ((unsigned int *)name, INSERT);
+  slot = htab.find_slot ((const unsigned int *)name, INSERT);
   if (!*slot)
     {
       *slot = (unsigned int *) xmalloc (sizeof (unsigned int));


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