Skip to content

Commit fbeafe0

Browse files
authored
[ffigen] Avoid errors in C header file (#1951)
Upstreaming a patch from somewhere downstream
1 parent efba183 commit fbeafe0

File tree

1 file changed

+4
-6
lines changed
  • pkgs/ffigen/test/header_parser_tests

1 file changed

+4
-6
lines changed

pkgs/ffigen/test/header_parser_tests/globals.h

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,22 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
#include <stdint.h>
65
#include <stdbool.h>
6+
#include <stdint.h>
77

88
bool coolGlobal;
99
int32_t myInt;
1010
int32_t *aGlobalPointer0;
11-
int32_t *const aGlobalPointer1;
11+
int32_t *const aGlobalPointer1 = nullptr;
1212
const int32_t *aGlobalPointer2;
13-
const int32_t *const aGlobalPointer3;
13+
const int32_t *const aGlobalPointer3 = nullptr;
1414
long double longDouble;
1515
long double *pointerToLongDouble;
1616

1717
// This should be ignored
1818
int GlobalIgnore;
1919

20-
struct EmptyStruct
21-
{
22-
};
20+
struct EmptyStruct {};
2321

2422
struct EmptyStruct globalStruct;
2523

0 commit comments

Comments
 (0)