We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06c3a7d commit 2e729baCopy full SHA for 2e729ba
compiler-rt/test/sanitizer_common/TestCases/Posix/variadic-open.cpp
@@ -2,16 +2,17 @@
2
// RUN: mkdir -p %t.tmp
3
// RUN: %clangxx -O1 %s -o %t && %run %t %t.tmp/1 %t.tmp
4
5
-#define _GNU_SOURCE
6
-
7
#include <assert.h>
8
#include <fcntl.h>
+#include <stdio.h>
9
#include <sys/stat.h>
10
#include <unistd.h>
11
12
void test(const char *path, int flags) {
13
assert(path);
14
int fd = open(path, flags, 0600);
+ if (fd == -1)
15
+ perror ("open");
16
assert(fd != -1);
17
struct stat info;
18
int result = fstat(fd, &info);
0 commit comments