Sign in
gnu
/
gcc
/
61351ab96a4dfa0884c8b1a53342b97915fb5dd7
/
.
/
gcc
/
testsuite
/
gcc.dg
/
strncpy-fix-1.c
blob: b4fd4aa4877a007a546abe65b68e9121966516c0 [
file
] [
log
] [
blame
]
/* Test that use of strncpy does not result in a "value computed is
not used" warning. */
/* { dg-do compile } */
/* { dg-options "-O2 -Wall -Wno-stringop-truncation" } */
#include
<string.h>
void
f
(
char
*
s
)
{
strncpy
(
s
,
"::"
,
2
);
}