Skip to content

Commit c68c433

Browse files
committed
[NFC] Small cleanup in stdlib/public/runtime.
These changes fix minor issues that cause compilation errors with our C++ toolchain's stricter default settings: * `Exception.cpp`: The return type of `__cxa_begin_catch` should be `void *`, not `void` (see https://libcxxabi.llvm.org/spec.html). * `Leaks.mm`: `''` is not a valid C char literal; use `'\0'` instead.
1 parent 6236b25 commit c68c433

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

stdlib/public/runtime/Exception.cpp

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

3232
using namespace swift;
3333

34-
extern "C" void __cxa_begin_catch(void *);
34+
extern "C" void *__cxa_begin_catch(void *);
3535

3636
SWIFT_RUNTIME_STDLIB_API _Unwind_Reason_Code
3737
_swift_exceptionPersonality(int version,

stdlib/public/runtime/Leaks.mm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,5 +228,5 @@ static void _swift_leaks_stopTrackingObjCObject(id Object) {
228228
}
229229

230230
#else
231-
static char DummyDecl = '';
231+
static char DummyDecl = '\0';
232232
#endif

0 commit comments

Comments
 (0)