Fix testcase -Wstringop-truncation warning in gcc11

This commit is contained in:
William S Fulton 2021-11-11 23:02:53 +00:00
parent 7da8ce722b
commit d15a3cb1d4
3 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ class Exc {
public:
Exc(int c, const char *m) {
code = c;
strncpy(msg,m,256);
strncpy(msg,m,255);
}
int code;
char msg[256];

View File

@ -10,7 +10,7 @@ class Exc {
public:
Exc(int c, const char *m) {
code = c;
strncpy(msg,m,256);
strncpy(msg,m,255);
}
int code;
char msg[256];

View File

@ -10,7 +10,7 @@ class Exc {
public:
Exc(int c, const char *m) {
code = c;
strncpy(msg,m,256);
strncpy(msg,m,255);
}
int code;
char msg[256];