Lines Matching defs:strncpy
442 // strncpy()
450 #define strncpy(a,b,n) __strncpy_chk(a,b,n,(size_t)-1)
454 #define strncpy BUILTIN(strncpy)
455 char *strncpy(char *restrict s1, const char *restrict s2, size_t n);
461 strncpy(NULL, x, 5); // expected-warning{{Null pointer argument in call to string copy function}}
465 strncpy(x, NULL, 5); // expected-warning{{Null pointer argument in call to string copy function}}
469 strncpy(x, (char*)&strcpy_fn, 5); // expected-warning{{Argument to string copy function is the address of the function 'strcpy_fn', which is not a null-terminated string}}
475 clang_analyzer_eval(strncpy(x, y, 5) == x); // expected-warning{{TRUE}}
483 strncpy(x, y, 5); // expected-warning{{Size argument is greater than the length of the destination buffer}}
489 strncpy(x, y, 5); // expected-warning{{Size argument is greater than the length of the destination buffer}}
498 strncpy(x, y, n); // expected-warning{{Size argument is greater than the length of the destination buffer}}
504 strncpy(x, y, 3); // no-warning
510 strncpy(x, y, 3); // no-warning
515 strncpy(x, y, 4); // no-warning
517 // strncpy does not null-terminate, so we have no idea what the strlen is
524 strncpy(dst, src, 0); // no-warning
530 strncpy(dst, src, 4); // no-warning
1102 strncpy(x, y, 4); // no-warning