Opened 5 years ago
Closed 2 years ago
#60014 closed defect (fixed)
unalz @ 0.65: error: 'register' storage class specifier is deprecated ...
Reported by: | Cor0n4V1rus | Owned by: | RobK88 |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | haspatch | Cc: | |
Port: | unalz |
Description (last modified by mf2k (Frank Schima))
build fails with modern c++ compiler(s), clang-9 in this case:
/opt/local/bin/clang++-mp-9.0 -Os -stdlib=libc++ -arch x86_64 -arch i386 -c -o UnAlz.o UnAlz.cpp UnAlz.cpp:1910:23: error: cannot initialize a variable of type 'const unsigned long *' with an rvalue of type 'const z_crc_t *' (aka 'const unsigned int *') const unsigned long *CRC_TABLE = get_crc_table(); ^ ~~~~~~~~~~~~~~~ UnAlz.cpp:1938:2: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] register unsigned int i = 0; ^~~~~~~~~ UnAlz.cpp:1950:2: warning: 'register' storage class specifier is deprecated and incompatible with C++17 [-Wdeprecated-register] register char *d = dest; ^~~~~~~~~ 2 warnings and 1 error generated. make: *** [UnAlz.o] Error 1
the appended new Portfile also patches another build error:
/opt/local/bin/clang++-mp-9.0 -Os -stdlib=libc++ -arch x86_64 -arch i386 -c -o UnAlz.o UnAlz.cpp UnAlz.cpp:1910:23: error: cannot initialize a variable of type 'const unsigned long *' with an rvalue of type 'const z_crc_t *' (aka 'const unsigned int *') const unsigned long *CRC_TABLE = get_crc_table(); ^ ~~~~~~~~~~~~~~~ 1 error generated. make: *** [UnAlz.o] Error 1
since the source code files are not using unix newlines and I don't know how to handle them with the patch program directly and I'm too lazy to invoke tr, sed or another program to fix that first via the Portfile (which might help future patch-actions), I just added two new 'reinplace' instructions to the Portfile.
Attachments (2)
Change History (6)
Changed 5 years ago by Cor0n4V1rus
Attachment: | unalz-main.log added |
---|
Changed 5 years ago by Cor0n4V1rus
comment:1 Changed 5 years ago by mf2k (Frank Schima)
Thanks. Per the guidelines, please instead attach a unified diff of the Portfile so we can easily see what changes you are proposing. Or better yet, submit a GitHub pull request.
In the future, please use WikiFormatting.
comment:2 Changed 5 years ago by mf2k (Frank Schima)
Cc: | minskim@… removed |
---|---|
Description: | modified (diff) |
Owner: | set to minskim@… |
Status: | new → assigned |
comment:4 Changed 2 years ago by RobK88
Owner: | set to RobK88 |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
patched Portfile