Opened 11 years ago

Closed 9 years ago

#6582 closed Bugs (fixed)

Remove unused parameter warning in property tree json parser

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.

Attachments (2)

boost-01.patch (525 bytes ) - added by JL <julio.lopez@…> 11 years ago.
Patch with a way of solving it.
json_parser_read.hpp.diff (464 bytes ) - added by Shane Turner <shane.turner@…> 10 years ago.
Silence the warnings from GCC about unused parameters by commenting out the second variable, leaving only the type.

Download all attachments as: .zip

Change History (9)

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)

comment:4 by Mateusz Loskot, 9 years ago

Once this ticket is solved, the duplicate #8022 should be closed

comment:5 by shane.turner@…, 9 years ago

Is there any chance that this can be fixed in Boost 1.55.0?

comment:6 by Sebastian Redl, 9 years ago

Status: newassigned

Fixed on develop: da37088

comment:7 by Sebastian Redl, 9 years ago

Resolution: fixed
Status: assignedclosed

Merged to master in 85f8d8866ccf.

Note: See TracTickets for help on using tickets.