Comments (8)
By the way, just wanted to say, THANK YOU very much for creating this software. I'm working on a project to help preserve some of our digital history and this being able to extract the resources from resource forks is quite invaluable for old MacOS files.
THANKS!
from resource_dasm.
Thanks for the report. The RealmzLib error was actually a legit bug; I'm surprised I never caught it.
I've added some of the -Wno flags to CMakeLists, but I find maybe-uninitialized, no-format, and no-aggressive-loop-optimizations useful during my work, so I've left them enabled. If the build still produces errors, could you post the full output here and I'll fix all the necessary cases?
I'm hoping to set up some kind of CI here in the near future, so my use of a somewhat-permissive compiler won't cause problems for others anymore.
from resource_dasm.
Thanks for the changes. Current code results in error:
/home/sembiance/Assorted/resource_dasm/src/hypercard_dasm.cc:1290:51: error: format ‘%llX’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ {aka ‘long unsigned int’} [-Werror=format=]
1290 | fprintf(f.get(), "-- patterns[%zu]: 0x%016llX\n", x, stack->patterns[x]);
| ~~~~~~^ ~~~~~~~~~~~~~~~~~~
| | |
| long long unsigned int uint64_t {aka long unsigned int}
| %016lX
from resource_dasm.
Fixed that just now. (Why are the length codes different on different systems? Sigh...)
from resource_dasm.
Errors:
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/QuickDrawEngine.cc: In member function ‘Image QuickDrawEngine::pict_decode_smc(const PictQuickTimeImageDescription&, const std::vector<ColorTableEntry>&, const string&)’:
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/QuickDrawEngine.cc:787:19: error: ‘prev_y1’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
787 | ret.blit(ret, x, y, 4, 4, prev_x2, prev_y2);
| ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/QuickDrawEngine.cc:787:19: error: ‘prev_x1’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
and
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/ResourceFile.cc: In member function ‘std::string ResourceFile::decompress_resource(const string&, uint64_t)’:
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/ResourceFile.cc:655:21: error: ‘entry_r2’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
655 | regs.r[2].u = entry_r2;
| ~~~~~~~~~~~~^~~~~~~~~~
from resource_dasm.
Fixed these as well.
from resource_dasm.
Compiles great now.
You can safely remove flag -Wno-overflow
. Code compiles fine without that, I included that by mistake earlier, sorry.
If you remove -Wno-unused-result
I get the error:
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/dc_dasm.cc: In function ‘std::vector<ResourceEntry> load_index(FILE*)’:
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/dc_dasm.cc:312:8: error: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
312 | fread(&h, sizeof(ResourceHeader), 1, f);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/dc_dasm.cc:316:8: error: ignoring return value of ‘size_t fread(void*, size_t, size_t, FILE*)’ declared with attribute ‘warn_unused_result’ [-Werror=unused-result]
316 | fread(e.data(), sizeof(ResourceEntry), h.resource_count, f);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
And if you remove -Wno-strict-aliasing
I get the errors:
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/M68KEmulator.cc: In member function ‘uint32_t M68KEmulator::read(const M68KEmulator::ResolvedAddress&, uint8_t)’:
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/M68KEmulator.cc:326:15: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
326 | return *reinterpret_cast<uint16_t*>(&this->regs.d[addr.addr].u);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/M68KEmulator.cc:336:15: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
336 | return *reinterpret_cast<uint16_t*>(&this->regs.a[addr.addr]);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/M68KEmulator.cc: In member function ‘void M68KEmulator::write(const M68KEmulator::ResolvedAddress&, uint32_t, uint8_t)’:
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/M68KEmulator.cc:369:8: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
369 | *reinterpret_cast<uint16_t*>(&this->regs.d[addr.addr].u) = value;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/M68KEmulator.cc:379:8: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
379 | *reinterpret_cast<uint16_t*>(&this->regs.a[addr.addr]) = value;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/M68KEmulator.cc: In member function ‘void M68KEmulator::exec_5(uint16_t)’:
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/M68KEmulator.cc:1698:29: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
1698 | uint16_t& target = *reinterpret_cast<uint16_t*>(&this->regs.d[Xn].u);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/M68KEmulator.cc: In member function ‘void M68KEmulator::exec_E(uint16_t)’:
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/M68KEmulator.cc:2434:29: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
2434 | uint16_t& target = *reinterpret_cast<uint16_t*>(&this->regs.d[Xn].u);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/app-arch/resource-dasm-0_p20220101/work/resource_dasm-master/src/M68KEmulator.cc:2471:39: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
2471 | int16_t& signed_target = *reinterpret_cast<int16_t*>(&this->regs.d[Xn].u);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
from resource_dasm.
Great - thanks for the help!
from resource_dasm.
Related Issues (20)
- Black borders when decoding PICT HOT 3
- Format of Spectre Supreme "shap" resources HOT 7
- Technically, it's "PEF", not "PEFF" (Preferred Executable Format) HOT 1
- Improvement : extracting as png instead of bmp HOT 5
- compile error in Ubuntu on Pi4 ARM HOT 16
- warning: PICT rendering failed (mask region rect Rect(x1=-27892, y1=26790, x2=0, y2=256) is not same as source rect HOT 5
- Suggestion: Conditional compilation for some features HOT 4
- Easier way to convert TEXT/styl to .rtf? HOT 2
- Prebuilt binary for Linux with phosg prelinked HOT 2
- issue with Mail.app .emlx files HOT 6
- Maelstrom icns converted to PNG/BMP are just mask HOT 4
- Bad CPU type in executable HOT 2
- Incorrect canvas size for some PICTs HOT 5
- Doesn't Work On Amazon Trail? HOT 2
- compile errors with g++ 13.2.1 20230826 HOT 4
- Blobbo - resource fork missing or empty HOT 6
- Minor Issue: BCD Version numbers in 'vers' resources HOT 1
- Support for CDRV resources? HOT 4
- Decoding QuickTime files?
- Unable to build on Fedora 40 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from resource_dasm.