Ticket #4377: functional-suppress_unused_warning.patch

File functional-suppress_unused_warning.patch, 5.7 KB (added by Marco Guazzone <marco.guazzone@…>, 12 years ago)

Commented unused function arguments

  • boost/numeric/ublas.

    diff -Naur boost/numeric/ublas.orig/functional.hpp boost/numeric/ublas.new/functional.hpp
    old new  
    17301730        // FIXME: this should not be used at all
    17311731        static
    17321732        BOOST_UBLAS_INLINE
    1733         size_type restrict1 (size_type i, size_type j) {
     1733        size_type restrict1 (size_type i, size_type /* j */) {
    17341734            return i;
    17351735        }
    17361736        static
    17371737        BOOST_UBLAS_INLINE
    1738         size_type restrict2 (size_type i, size_type j) {
     1738        size_type restrict2 (size_type /* i */, size_type j) {
    17391739            return j;
    17401740        }
    17411741        static
    17421742        BOOST_UBLAS_INLINE
    1743         size_type mutable_restrict1 (size_type i, size_type j) {
     1743        size_type mutable_restrict1 (size_type i, size_type /* j */) {
    17441744            return i;
    17451745        }
    17461746        static
    17471747        BOOST_UBLAS_INLINE
    1748         size_type mutable_restrict2 (size_type i, size_type j) {
     1748        size_type mutable_restrict2 (size_type /* i */, size_type j) {
    17491749            return j;
    17501750        }
    17511751    };
     
    17801780            template<class LAYOUT>
    17811781            static
    17821782            BOOST_UBLAS_INLINE
    1783             size_type element (LAYOUT l, size_type i, size_type size_i, size_type j, size_type size_j) {
     1783            size_type element (LAYOUT /* l */, size_type i, size_type size_i, size_type j, size_type size_j) {
     1784                                //detail::ignore_unused_variable_warning( l );
     1785
    17841786                return L::element(typename LAYOUT::transposed_layout(), j, size_j, i, size_i);
    17851787            }
    17861788
     
    18771879        // return nearest valid mutable index in column j
    18781880        static
    18791881        BOOST_UBLAS_INLINE
    1880         size_type mutable_restrict1 (size_type i, size_type j, size_type size1, size_type size2) {
     1882        size_type mutable_restrict1 (size_type i, size_type j, size_type size1, size_type /* size2 */) {
     1883                        //detail::ignore_unused_variable_warning( size2 );
     1884
    18811885            return (std::max)(j, (std::min) (size1, i));
    18821886        }
    18831887        // return nearest valid mutable index in row i
     
    18901894        // return an index between the first and (1+last) filled row
    18911895        static
    18921896        BOOST_UBLAS_INLINE
    1893         size_type global_restrict1 (size_type index1, size_type size1, size_type index2, size_type size2) {
     1897        size_type global_restrict1 (size_type index1, size_type size1, size_type /* index2 */, size_type /* size2 */) {
    18941898            return (std::max)(size_type(0), (std::min)(size1, index1) );
    18951899        }
    18961900        // return an index between the first and (1+last) filled column
    18971901        static
    18981902        BOOST_UBLAS_INLINE
    1899         size_type global_restrict2 (size_type index1, size_type size1, size_type index2, size_type size2) {
     1903        size_type global_restrict2 (size_type /* index1 */, size_type /* size1 */, size_type index2, size_type size2) {
    19001904            return (std::max)(size_type(0), (std::min)(size2, index2) );
    19011905        }
    19021906
    19031907        // return an index between the first and (1+last) filled mutable row
    19041908        static
    19051909        BOOST_UBLAS_INLINE
    1906         size_type global_mutable_restrict1 (size_type index1, size_type size1, size_type index2, size_type size2) {
     1910        size_type global_mutable_restrict1 (size_type index1, size_type size1, size_type /* index2 */, size_type /* size2 */) {
     1911                        //detail::ignore_unused_variable_warning( index2 );
     1912                        //detail::ignore_unused_variable_warning( size2 );
     1913
    19071914            return (std::max)(size_type(0), (std::min)(size1, index1) );
    19081915        }
    19091916        // return an index between the first and (1+last) filled mutable column
    19101917        static
    19111918        BOOST_UBLAS_INLINE
    1912         size_type global_mutable_restrict2 (size_type index1, size_type size1, size_type index2, size_type size2) {
     1919        size_type global_mutable_restrict2 (size_type /* index1 */, size_type /* size1 */, size_type index2, size_type size2) {
     1920                        //detail::ignore_unused_variable_warning( index1 );
     1921                        //detail::ignore_unused_variable_warning( size1 );
     1922
    19131923            return (std::max)(size_type(0), (std::min)(size2, index2) );
    19141924        }
    19151925    };
     
    19501960
    19511961        static
    19521962        BOOST_UBLAS_INLINE
    1953         size_type mutable_restrict1 (size_type i, size_type j, size_type size1, size_type size2) {
     1963        size_type mutable_restrict1 (size_type i, size_type j, size_type size1, size_type /* size2 */) {
    19541964            return (std::max)(j+1, (std::min) (size1, i));
    19551965        }
    19561966        static
    19571967        BOOST_UBLAS_INLINE
    1958         size_type mutable_restrict2 (size_type i, size_type j, size_type size1, size_type size2) {
     1968        size_type mutable_restrict2 (size_type i, size_type j, size_type /* size1 */, size_type /* size2 */) {
    19591969            return (std::max)(size_type(0), (std::min) (i, j));
    19601970        }
    19611971
    19621972        // return an index between the first and (1+last) filled mutable row
    19631973        static
    19641974        BOOST_UBLAS_INLINE
    1965         size_type global_mutable_restrict1 (size_type index1, size_type size1, size_type index2, size_type size2) {
     1975        size_type global_mutable_restrict1 (size_type index1, size_type size1, size_type /* index2 */, size_type /* size2 */) {
    19661976            return (std::max)(size_type(1), (std::min)(size1, index1) );
    19671977        }
    19681978        // return an index between the first and (1+last) filled mutable column
    19691979        static
    19701980        BOOST_UBLAS_INLINE
    1971         size_type global_mutable_restrict2 (size_type index1, size_type size1, size_type index2, size_type size2) {
     1981        size_type global_mutable_restrict2 (size_type /* index1 */, size_type /* size1 */, size_type index2, size_type size2) {
    19721982            BOOST_UBLAS_CHECK( size2 >= 1 , external_logic() );
    19731983            return (std::max)(size_type(0), (std::min)(size2-1, index2) );
    19741984        }