-Wfree-nonheap-object warning fix using gcc-11
This commit is contained in:
parent
d15a3cb1d4
commit
6cafc93135
1 changed files with 5 additions and 1 deletions
|
|
@ -61,7 +61,11 @@ void CheckRetTypemapUsed() {
|
|||
%inline {
|
||||
class FFoo {
|
||||
public:
|
||||
char * Bar(bool b) const { return (char *)"x"; }
|
||||
char * Bar(bool b) const {
|
||||
char *ret = new char[2];
|
||||
strcpy(ret, b ? "1" : "0");
|
||||
return ret;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue