Throws a Weffc++ warning: warning: ‘std::fpos<state>& std::fpos<state>::operator+(const streamoff&)’ should return by value [-Weffc++]
A similar change was made to gcc's libstdcpp back in 2001. Signed-off-by: Rosen Penev <[email protected]> --- include/ios | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/ios b/include/ios index ac6566a..87d6c3a 100644 --- a/include/ios +++ b/include/ios @@ -478,11 +478,11 @@ namespace std{ _UCXXEXPORT bool operator!=(const fpos &rhs){ return st != rhs.st; } - _UCXXEXPORT fpos & operator+(const streamoff & o){ + _UCXXEXPORT fpos operator+(const streamoff & o){ st += o; return *this; } - _UCXXEXPORT fpos & operator-(const streamoff & o){ + _UCXXEXPORT fpos operator-(const streamoff & o){ st -= o; return *this; } -- 2.17.1 _______________________________________________ uClibc mailing list [email protected] http://lists.busybox.net/mailman/listinfo/uclibc
