diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/analyzer')
-rw-r--r-- | gcc/testsuite/c-c++-common/analyzer/call-summaries-malloc.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/analyzer/strncpy-1.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gcc/testsuite/c-c++-common/analyzer/call-summaries-malloc.c b/gcc/testsuite/c-c++-common/analyzer/call-summaries-malloc.c index 6522c37..d9d9ced 100644 --- a/gcc/testsuite/c-c++-common/analyzer/call-summaries-malloc.c +++ b/gcc/testsuite/c-c++-common/analyzer/call-summaries-malloc.c @@ -67,7 +67,7 @@ void test_use_after_free (void) void test_use_without_check (size_t sz) { char *buf = (char *) wrapped_malloc (sz); /* { dg-message "this call could return NULL" } */ - memset (buf, 'x', sz); /* { dg-warning "use of possibly-NULL 'buf' where non-null expected" } */ + memset (buf, 'x', 4); /* { dg-warning "use of possibly-NULL 'buf' where non-null expected" } */ wrapped_free (buf); } diff --git a/gcc/testsuite/c-c++-common/analyzer/strncpy-1.c b/gcc/testsuite/c-c++-common/analyzer/strncpy-1.c index 8edaf26..f8b38a5 100644 --- a/gcc/testsuite/c-c++-common/analyzer/strncpy-1.c +++ b/gcc/testsuite/c-c++-common/analyzer/strncpy-1.c @@ -20,13 +20,13 @@ test_passthrough (char *dst, const char *src, size_t count) char * test_null_dst (const char *src, size_t count) { - return strncpy (NULL, src, count); /* { dg-warning "use of NULL where non-null expected" } */ + return strncpy (NULL, src, 42); /* { dg-warning "use of NULL where non-null expected" } */ } char * test_null_src (char *dst, size_t count) { - return strncpy (dst, NULL, count); /* { dg-warning "use of NULL where non-null expected" } */ + return strncpy (dst, NULL, 42); /* { dg-warning "use of NULL where non-null expected" } */ } void |