Closed avrs-admin closed 2 years ago
joerg_wunsch 2020-09-17 20:36:36.186000
joerg_wunsch 2020-09-17 20:36:36.809000
Well, the AX_GCC_VAR_ATTRIBUTE was missing in my autoconf version.
Thus I decided it's easier to simply replace__unused
by __attribute__((unused))
in the few places where it's being used.
coldtobi 2020-09-18 07:16:21.727000
On Thu, Sep 17, 2020 at 08:36:39PM -0000, Joerg Wunsch wrote:
- status: open --> closed
- assigned_to: Joerg Wunsch
- Comment:
Well, the AX_GCC_VAR_ATTRIBUTE was missing in my autoconf version. Thus I decided it's easier to simply replace
__unused
by__attribute__((unused))
in the few places where it's being used.
Thanks Jörg for fixing it that fast ;)
I was just unsure if hardcoding was ok with you, I assumed you have some compiler that understands _unused natively and I didnt want to break stuff on your side. (For completeness The AX… macro is Debian in the autoconf-archive package, and (at least here found automatically when it is installed and a autoreconf -f -i is done. Otherwise it'd be here: http://git.savannah.gnu.org/gitweb/?p=autoconf-archive.git;a=blob_plain;f=m4/ax_gcc_var_attribute.m4)
BTW, Many thanks for maintaining avarice!
Cheers, -- tobi
coldtobi
2020-09-17 16:01:50.162000
While creating the updated Debian package for version 2.14 I ran into this compilation issue:
jtag3io.cc: At global scope: jtag3io.cc:358:39: error: expected ',' or '...' before 'unused' 358 | bool jtag3::synchroniseAt(int bitrate unused) | ^
~~~ jtag3io.cc: In member function 'virtual bool jtag3::synchroniseAt(int)': jtag3io.cc:358:31: warning: unused parameter 'bitrate' [-Wunused-parameter] 358 | bool jtag3::synchroniseAt(int bitrate __unused) |~~^~~~~ make[3]: [Makefile:530: jtag3io.o] Error 1 make[3]: Waiting for unfinished jobs....The gcc10 here in Debian does choke on the "__unused." The attached patch adds an feature check using AX_GCC_VAR_ATTRIBUTE from the autoconf-archive [1] wether a define is needed and the defines unused to arttibute__((unused)) which is understood by many compilers, according to [1]. If not, it is left alone (because I assume that the code compiles on your side)
[1] https://www.gnu.org/software/autoconf-archive/ax_gcc_var_attribute.html#ax_gcc_var_attribute
Cheers, tobi
This issue was migrated from https://sourceforge.net/p/avarice/patches/39/