lclevy / ADFlib

A free, portable and open implementation of the Amiga filesystem
GNU General Public License v2.0
90 stars 30 forks source link

A couple of issues GCC10 brings up #14

Closed Kalamatee closed 3 years ago

Kalamatee commented 3 years ago

Hi! while compiling this with GCC 10 I see the following 2 messages of note (the first seems a bit more important since it copies to a NULL pointer)...

/ADFlib/src/adf_link.c:48:5: warning: argument 1 null where non-null expected [-Wnonnull] 48 | memcpy(tmpPath,entryBlk.name,len); | ^~~~~~~~~

/ADFlib/src/adf_disk.c:167:27: warning: self-comparison always evaluates to false [-Wtautological-compare] 167 if (dev==NULL nPart<nPart nPart >= dev->nVol) {
lclevy commented 3 years ago

Hi, Feel free to submit a patch. I have not touched this code since years. See also Debian version of unadf, likely updated for more more recent compilers

lclevy commented 3 years ago

https://tracker.debian.org/pkg/unadf

Kalamatee commented 3 years ago

On Mon, 18 Jan 2021 at 20:26, Laurent Clévy notifications@github.com wrote:

Hi, Feel free to submit a patch. I have not touched this code since years. See also Debian version of unadf, likely updated for more more recent compilers

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lclevy/ADFlib/issues/14#issuecomment-762456424, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWCNPGUDJMBXYLDR7NSBM3S2SKQZANCNFSM4WHY47SQ .

Thanks for replying Laurent.

I've fixed the issues that are reported when it compiled in our build system - and opened a pull request for your consideration.

Thanks again, Nick Andrews.