Fix Make Unused Not Compiler Specific (#34357)

Summary:
Use of `__attribute__` and `__unused` is compiler specific. Opt for standard `[[maybe_unused]]` instead.

## Changelog

[General] [Fixed] - Remove compiler-specific syntax.

Pull Request resolved: https://github.com/facebook/react-native/pull/34357

Test Plan: Built on react-native-windows.

Reviewed By: cipolleschi

Differential Revision: D38498481

Pulled By: javache

fbshipit-source-id: af43206788f54dda3b747b6417e20096c7d520e8
This commit is contained in:
Chiara Mooney
2022-08-08 03:50:58 -07:00
committed by Facebook GitHub Bot
parent 60e7eb4d53
commit 33dbb6c40c
5 changed files with 6 additions and 7 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ static BOOL RCTParseSelectorPart(const char **input, NSMutableString *selector)
static BOOL RCTParseUnused(const char **input)
{
return RCTReadString(input, "__attribute__((unused))") || RCTReadString(input, "__attribute__((__unused__))") ||
RCTReadString(input, "__unused");
RCTReadString(input, "__unused") || RCTReadString(input, "[[maybe_unused]]");
}
static RCTNullability RCTParseNullability(const char **input)