Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#4377 closed Patches (fixed)

Suppress 'unused variable' warnings in functional.hpp

Reported by: Marco Guazzone <marco.guazzone@…> Owned by: Gunter
Milestone: Boost 1.44.0 Component: uBLAS
Version: Boost 1.44.0 Severity: Cosmetic
Keywords: Cc:

Description

In functional.hpp there are several functions with unused arguments (mostly due to specialized cases).

In order to avoid the annoying 'unused variable' compiler warnings, I suggest to comment these unused arguments.

In the attachment there is a patch for the functional.hpp file (svn rev. 63303).

Attachments (2)

functional-suppress_unused_warning.patch (5.7 KB ) - added by Marco Guazzone <marco.guazzone@…> 12 years ago.
Commented unused function arguments
functional-suppress_unused_warning-2.patch (671 bytes ) - added by Marco Guazzone <marco.guazzone@…> 12 years ago.
Patch to comment parameter size2 at line 1868 of functional.hpp.

Download all attachments as: .zip

Change History (5)

by Marco Guazzone <marco.guazzone@…>, 12 years ago

Commented unused function arguments

comment:1 by Marshall Clow, 12 years ago

Resolution: fixed
Status: newclosed

(In [63413]) Applied patch. Fixes #4377

comment:2 by Marco Guazzone <marco.guazzone@…>, 12 years ago

I missed to comment a parameter.

In file funcitonal.hpp (line 1868) the function:

size_type restrict1 (size_type i, size_type j, size_type size1, size_type size2) {
  return (std::max)(j, (std::min) (size1, i));
}

has a parameter size which is never used.

I attach another patch, to be applied after the one I've already uploaded, where that parameter is simply commented.

by Marco Guazzone <marco.guazzone@…>, 12 years ago

Patch to comment parameter size2 at line 1868 of functional.hpp.

comment:3 by Marshall Clow, 12 years ago

I've applied the second patch to the trunk. Once the tests have cycled, I'll apply it to the release branch. This close to release, I don't think it will make it into 1.44; look for it in 1.45

Note: See TracTickets for help on using tickets.