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 cbb5423 commit 3df370aCopy full SHA for 3df370a
c/cert/test/rules/FIO38-C/test.c.qcc
@@ -1,4 +1,11 @@
1
#include <stdio.h>
2
+// Workaround for the Musl implementing FILE as an incomplete type.
3
+#if !defined(__DEFINED_struct__IO_FILE)
4
+struct _IO_FILE {
5
+ char __x;
6
+};
7
+#define __DEFINED_struct__IO_FILE
8
+#endif
9
10
int f1(void) {
11
FILE my_stdout = *stdout; // NON_COMPLIANT
@@ -13,7 +20,7 @@ int f2(void) {
13
20
}
14
21
int f2b(void) {
15
22
FILE *const *my_stdout;
16
- my_stdout = &stdout; // COMPLIANT
23
+ // my_stdout = &stdout; // does not compile in qcc
17
24
FILE my_stdout2 = **my_stdout; // NON_COMPLIANT
18
25
return fputs("Hello, World!\n", *my_stdout);
19
26
0 commit comments