Unused parameter warning when adding hints

34 views
Skip to first unread message

flyashi

unread,
Aug 15, 2013, 1:11:07 PM8/15/13
to zx...@googlegroups.com
Hi,

I've been working on fixing Issue 1737 in C++ (https://code.google.com/p/zxing/issues/detail?id=1737) and noticed that the hints are not being passed to a OneDReader's decodeRow, as they are in Java. So, I added a DecodeHints hint parameter to each OneDReader's decodeRow, and implemented the two-line fix in r2847 (https://code.google.com/p/zxing/source/detail?r=2847).

However, I get the following from the other Readers:
g++ -o build/core/src/zxing/oned/Code128Reader.o -c -ansi -pedantic -O0 -g3 -ggdb -Wall -Wextra -Werror -Ibuild/core/src build/core/src/zxing/oned/Code128Reader.cpp
build/core/src/zxing/oned/Code128Reader.cpp:249:13: error: unused parameter 'hints' [-Werror=unused-parameter]

Any tips on how to proceed? I see a few alternatives:
 - store the hints in a class variable in the OneDReader (or any Reader?)
 - store the hints in a class variable in the CodaBarReader
 - Add -Wno-error=unused-parameter (or no -Wno-unused-parameter)

Thanks,

 - flyashi
zxing-cpp-add-hints-fix-codabar.patch

Sean Owen

unread,
Aug 15, 2013, 1:27:49 PM8/15/13
to zx...@googlegroups.com
(I'd open an issue at code.google.com/p/zxing -- will make it easier for smparkes to track)

Steven Parkes

unread,
Aug 15, 2013, 1:55:13 PM8/15/13
to flyashi, zx...@googlegroups.com
Thanks. I'll look this weekend. I have some time set aside to work through my zxing backlog ...
> --
>
> ---
> You received this message because you are subscribed to the Google Groups "zxing" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to zxing+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
> <zxing-cpp-add-hints-fix-codabar.patch>

Reply all
Reply to author
Forward
0 new messages