Skip to content

Commit

Permalink
Fix compiling on older gcc
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Feb 2, 2019
1 parent 6d97b28 commit 0e801e3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/string_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
// strncpy(str, src1, len1) intentional truncates the null byte from src1.
// strncpy(str+len1, src2, len2) uses bound depends on the source argument,
// but str is allocated with len1+len2+1, so this strncpy can't overflow
#pragma GCC diagnostic ignored "-Wpragmas"
#pragma GCC diagnostic ignored "-Wstringop-truncation"
#pragma GCC diagnostic ignored "-Wstringop-overflow"

Expand Down

0 comments on commit 0e801e3

Please sign in to comment.