Skip to content

Commit 030324c

Browse files
authored
[ffigen] Fix clang warning (#2150)
1 parent dd891c8 commit 030324c

File tree

6 files changed

+20
-2
lines changed

6 files changed

+20
-2
lines changed

pkgs/ffigen/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 18.1.0-wip
2+
3+
- Fix a clang warning in ObjC protocol generated bindings.
4+
15
## 18.0.0
26

37
- Add variable substitutions that can be used in the `headers.entry-points` to

pkgs/ffigen/lib/src/code_generator/writer.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,9 @@ class Writer {
422422
#error "This file must be compiled with ARC enabled"
423423
#endif
424424
425+
#pragma clang diagnostic push
426+
#pragma clang diagnostic ignored "-Wundeclared-selector"
427+
425428
typedef struct {
426429
int64_t version;
427430
void* (*newWaiter)(void);
@@ -473,6 +476,8 @@ id objc_retainBlock(id);
473476

474477
s.write('''
475478
#undef BLOCKING_BLOCK_IMPL
479+
480+
#pragma clang diagnostic pop
476481
''');
477482

478483
return empty ? null : s.toString();

pkgs/ffigen/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# BSD-style license that can be found in the LICENSE file.
44

55
name: ffigen
6-
version: 18.0.0
6+
version: 18.1.0-wip
77
description: >
88
Generator for FFI bindings, using LibClang to parse C, Objective-C, and Swift
99
files.

pkgs/objective_c/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 7.1.0-wip
2+
3+
- Use ffigen 18.1.0
4+
15
## 7.0.0
26

37
- Use ffigen 18.0.0

pkgs/objective_c/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
name: objective_c
66
description: 'A library to access Objective C from Flutter that acts as a support library for package:ffigen.'
7-
version: 7.0.0
7+
version: 7.1.0-wip
88
repository: https://github.com/dart-lang/native/tree/main/pkgs/objective_c
99
issue_tracker: https://github.com/dart-lang/native/issues?q=is%3Aissue+is%3Aopen+label%3Apackage%3Aobjective_c
1010

pkgs/objective_c/src/objective_c_bindings_generated.m

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#error "This file must be compiled with ARC enabled"
1010
#endif
1111

12+
#pragma clang diagnostic push
13+
#pragma clang diagnostic ignored "-Wundeclared-selector"
14+
1215
typedef struct {
1316
int64_t version;
1417
void* (*newWaiter)(void);
@@ -283,3 +286,5 @@ id _ObjectiveCBindings_protocolTrampoline_c7gk2u(id target, void * sel, struct
283286
return ((ProtocolTrampoline_16)((id (*)(id, SEL, SEL))objc_msgSend)(target, @selector(getDOBJCDartProtocolMethodForSelector:), sel))(sel, arg1, arg2, arg3);
284287
}
285288
#undef BLOCKING_BLOCK_IMPL
289+
290+
#pragma clang diagnostic pop

0 commit comments

Comments
 (0)