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: Ada fixes for mingw32- cstreams.c (2/6)


Hello,

In ada/cstreams.c: __gnat_full_name() there are multiple returns nested
in target #ifdefs. On poor little mingw32, a return is never reached for
this non-void function. Rather than adding another one, I put it as the
last statement so it is always reached.

Danny

ada/Changelog

2003-10-22  Danny Smith  <dannysmith@users.sourceforge.net>

	* cstreams.c (__gnat_full_name): Move return statement outside
	of target ifdefs.

 

Index: cstreams.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/cstreams.c,v
retrieving revision 1.7
diff -c -3 -p -r1.7 cstreams.c
*** cstreams.c	21 Oct 2003 13:41:58 -0000	1.7
--- cstreams.c	22 Oct 2003 07:41:03 -0000
*************** __gnat_full_name (nam, buffer)
*** 206,213 ****
        strncpy (buffer, __gnat_to_host_file_spec (buffer), __gnat_max_path_len);
      }
  
-   return buffer;
- 
  #else
    if (nam[0] != '/')
      {
--- 206,211 ----
*************** __gnat_full_name (nam, buffer)
*** 228,233 ****
    else
      strcpy (buffer, nam);
  
-   return buffer;
  #endif
  }
--- 226,232 ----
    else
      strcpy (buffer, nam);
  
  #endif
+ 
+   return buffer;
  }


http://personals.yahoo.com.au - Yahoo! Personals
New people, new possibilities. FREE for a limited time.


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