Opened 11 years ago

Last modified 9 years ago

#6582 closed Bugs

Remove unused parameter warning in property tree json parser — at Version 3

Reported by: JL <julio.lopez@…> Owned by: Sebastian Redl
Milestone: To Be Determined Component: property_tree
Version: Boost 1.48.0 Severity: Cosmetic
Keywords: Cc:

Description (last modified by Mateusz Loskot)

Using the property json parser, in particular boost::property_tree::read_json(...), among probably other case, produces an "unused parameter 'e'" warning as follows:

... <template instantiation omitted for brevity >....

../../src/my_source.cc:ln:   instantiated from here
/...fullpath.../include/boost/property_tree/detail/json_parser_read.hpp:115: warning: unused parameter ‘e’

This prevents the use of the -Werror flag during compilation.

Patch attached.

Change History (5)

by JL <julio.lopez@…>, 11 years ago

Attachment: boost-01.patch added

Patch with a way of solving it.

by Shane Turner <shane.turner@…>, 10 years ago

Attachment: json_parser_read.hpp.diff added

Silence the warnings from GCC about unused parameters by commenting out the second variable, leaving only the type.

comment:1 by Shane Turner <shane.turner@…>, 10 years ago

Is there any chance that this patch could be applied for Boost 1.54.0?

comment:2 by Matthieu Vachon <matthieu.o.vachon@…>, 10 years ago

I prefer the patch from Shane Turner, which is my opinion easier to understand.

I'm facing the same problem, I have manually patched my version. Could this be looked, it is an easy fix that has no impact and can be integrated fairly easy.

Regards, Matt

comment:3 by Mateusz Loskot, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.