forked from libical/libical
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add __attribute__((sentinel)) to all _vanew function declarations
fixes: libical#604
- Loading branch information
Showing
5 changed files
with
28 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
SPDX-FileCopyrightText: Allen Winter <[email protected]> | ||
SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0 | ||
*/ | ||
|
||
#ifndef LIBICAL_SENTINEL_H | ||
#define LIBICAL_SENTINEL_H | ||
|
||
/* sentinel attribute macro */ | ||
#if defined(NO_SENTINEL_WARNINGS) | ||
#define LIBICAL_SENTINEL | ||
#else | ||
#if !defined(LIBICAL_SENTINEL) | ||
#if defined(__GNUC__) || defined(__clang__) | ||
#define LIBICAL_SENTINEL __attribute__((sentinel)) | ||
#else | ||
/* sentinel attributes are unknown to MSVC */ | ||
#define LIBICAL_SENTINEL | ||
#endif | ||
#endif | ||
#endif | ||
|
||
#endif |