Changeset dd7df1c in mainline for uspace/lib/c/test/string.c


Ignore:
Timestamp:
2023-10-22T17:26:17Z (7 months ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dcef1127
Parents:
71b4444
git-author:
Vojtech Horky <vojtech.horky@…> (2023-07-14 09:54:21)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2023-10-22 17:26:17)
Message:

Silence spurious/unwanted GCC warnings using pragmas

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/test/string.c

    r71b4444 rdd7df1c  
    799799PCUT_TEST(strndup_nonempty_short)
    800800{
     801#pragma GCC diagnostic push
     802        // Intentionally checking it works with _longer_ size than actual
     803#if defined(__GNUC__) && (__GNUC__ >= 11)
     804#pragma GCC diagnostic ignored "-Wstringop-overread"
     805#endif
    801806        char *d = strndup("abc", 5);
     807#pragma GCC diagnostic pop
    802808        PCUT_ASSERT_NOT_NULL(d);
    803809        PCUT_ASSERT_TRUE(d[0] == 'a');
Note: See TracChangeset for help on using the changeset viewer.