tomtor / dcrawps

dcraw fork with Pentax Pixel Shift support
GNU General Public License v2.0
8 stars 2 forks source link

Inadvertent comparison (==) where assignment (=) intended. #5

Closed jcbrill closed 3 years ago

jcbrill commented 3 years ago

There appears to be an inadvertent comparison operator where an assignment operator was intended.

In a local copy of dcrawps, minor changes were made to dcraw.c to compile with msvc 2019. The msvc compiler issued a warning for the statement modified in this PR: warning C4553: '==': result of expression not used; did you intend '='?

tomtor commented 3 years ago

Thanks!

jcbrill commented 3 years ago

You're welcome.

I posted a preliminary 64-bit build for windows on pentaxforums yesterday using self-compiled recent build of mingw-w64 gcc 11.1 with runtime 9.0. The 32-bit build was flagged by BitDefender locally and by about 11 engines on VirusTotal.

There are two very minor changes that can be made to compile with msvc 2019 on windows. With a few more additional changes, the dependency on the winsock library could optionally be removed.

Are you interested in a PR for enabling building with msvc 2019? It is basically modifying two of the existing pre-processor #if/#ifdef statements. If nothing else, you can simply reject the PR. If interested, which branch or both?

If desired, I could provide at least 64-bit windows binaries.

tomtor commented 3 years ago

The line

x86_64-w64-mingw32-gcc -o dcrawps64.exe dcraw.c -O4 -lws2_32 -DNODEPS

in build.sh builds a Windows executable on Linux. I copied that executable to http://www.v7f.eu/public/pentax/

but I will be happy to merge a PR for building with MSVC. Just the master branch, the v2021 was to prepare some changes.