Compiler.h: add gcc_returns_nonnull, gcc_returns_twice

This commit is contained in:
Max Kellermann
2017-12-18 23:00:13 +01:00
parent 5582367d68
commit edee8a3446
12 changed files with 27 additions and 23 deletions

View File

@@ -107,7 +107,7 @@ UnsafeCopyString(char *dest, const char *src) noexcept
strcpy(dest, src);
}
gcc_nonnull_all
gcc_returns_nonnull gcc_nonnull_all
static inline char *
UnsafeCopyStringP(char *dest, const char *src) noexcept
{
@@ -165,7 +165,7 @@ StringCollate(const char *a, const char *b) noexcept
* Copy the string to a new allocation. The return value must be
* freed with free().
*/
gcc_malloc gcc_nonnull_all
gcc_malloc gcc_returns_nonnull gcc_nonnull_all
static inline char *
DuplicateString(const char *p) noexcept
{