mirror of
https://github.com/scummvm/scummvm-tools.git
synced 2026-05-21 05:40:44 +00:00
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -158,6 +158,7 @@ void CompressTinsel::convertTinselADPCMSample (uint32 sampleSize) {
|
||||
outBuffer = (int16 *)malloc(uncompressedSize);
|
||||
if (!outBuffer) {
|
||||
print("malloc failed!\n");
|
||||
free(inBuffer);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user