Use delete[] after new[]
gmake: Wejście do katalogu '/usr/home/saper/sw/misskey/build' CXX(target) Release/obj.target/crypto_key/src/crypto_key.o ../src/crypto_key.cc:25:3: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete] delete sourceBuf; ^ [] ../src/crypto_key.cc:18:25: note: allocated with 'new[]' here const auto sourceBuf = new char[sourceLength]; ^ ../src/crypto_key.cc:32:2: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete] delete sourceBuf; ^ [] ../src/crypto_key.cc:18:25: note: allocated with 'new[]' here const auto sourceBuf = new char[sourceLength]; ^ 2 warnings generated.
Please register or sign in to comment