mirror of https://github.com/swig/swig
Fix testcase -Wstringop-truncation warning in gcc11
This commit is contained in:
parent
7da8ce722b
commit
d15a3cb1d4
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue