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]

[Ada] Fix PR ada/71817


Tested on PowerPC/VxWorks, applied on the mainline.


2016-07-11  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/71817
	* adaint.c (__gnat_is_read_accessible_file): Add parentheses.
	(__gnat_is_write_accessible_file): Likewise.

-- 
Eric Botcazou
Index: adaint.c
===================================================================
--- adaint.c	(revision 238156)
+++ adaint.c	(working copy)
@@ -1924,7 +1924,7 @@ __gnat_is_read_accessible_file (char *na
 #elif defined (__vxworks)
    int fd;
 
-   if (fd = open (name, O_RDONLY, 0) < 0)
+   if ((fd = open (name, O_RDONLY, 0)) < 0)
      return 0;
    close (fd);
    return 1;
@@ -1997,7 +1997,7 @@ __gnat_is_write_accessible_file (char *n
 #elif defined (__vxworks)
    int fd;
 
-   if (fd = open (name, O_WRONLY, 0) < 0)
+   if ((fd = open (name, O_WRONLY, 0)) < 0)
      return 0;
    close (fd);
    return 1;

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