Fixed extract_agos, compress_tinsel, sciunpack and tools.h for warnings given by cppcheck.

Compiles fine, but slightly unsure of possible effect of tools.h change. Needs testing.

svn-id: r47310
This commit is contained in:
David Turner
2010-01-15 20:01:55 +00:00
parent 001a6b7e53
commit 469d9f41bb
4 changed files with 5 additions and 4 deletions
+2 -3
View File
@@ -53,14 +53,13 @@ void ExtractAgos::execute() {
if (out) {
if (simon_decr(x, out, _filelen)) {
savefile(_outputPath.getFullPath(), out, decrlen);
free(x);
free(out);
} else {
free(x);
free(out);
error("%s: decrunch error\n", infilename.getFullPath().c_str());
}
free(x);
free(out);
}
}
+1
View File
@@ -158,6 +158,7 @@ void CompressTinsel::convertTinselADPCMSample (uint32 sampleSize) {
outBuffer = (int16 *)malloc(uncompressedSize);
if (!outBuffer) {
print("malloc failed!\n");
free(inBuffer);
return;
}
+1
View File
@@ -437,6 +437,7 @@ void unpack_resource(int stype, int snr, char *outfilename) {
guint8 *outdata = makeMIDI0(found->data, &midilength, midimask);
if (!outdata) {
fprintf(stderr, "MIDI conversion failed. Aborting...\n");
close(outf);
return;
}
if (verbose) printf("MIDI conversion from %d bytes of sound resource"
+1 -1
View File
@@ -33,7 +33,7 @@
class Tools {
public:
Tools();
~Tools();
virtual ~Tools();
typedef std::vector<Tool *> ToolList;