Giter Club home page Giter Club logo

Comments (8)

Sembiance avatar Sembiance commented on May 19, 2024 1

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.

fuzziqersoftware avatar fuzziqersoftware commented on May 19, 2024

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.

Sembiance avatar Sembiance commented on May 19, 2024

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.

fuzziqersoftware avatar fuzziqersoftware commented on May 19, 2024

Fixed that just now. (Why are the length codes different on different systems? Sigh...)

from resource_dasm.

Sembiance avatar Sembiance commented on May 19, 2024

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.

fuzziqersoftware avatar fuzziqersoftware commented on May 19, 2024

Fixed these as well.

from resource_dasm.

Sembiance avatar Sembiance commented on May 19, 2024

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.

fuzziqersoftware avatar fuzziqersoftware commented on May 19, 2024

Great - thanks for the help!

from resource_dasm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.