From patchwork Thu Oct 10 04:06:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 1174251 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=uclibc.org (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=uclibc-bounces@uclibc.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="eytK7y6C"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46pcvp40SSz9sDQ for ; Thu, 10 Oct 2019 15:06:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id CCDD620432; Thu, 10 Oct 2019 04:06:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id fa+rmiq9zY1Z; Thu, 10 Oct 2019 04:06:07 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id BE8982353A; Thu, 10 Oct 2019 04:06:07 +0000 (UTC) X-Original-To: uclibc@lists.busybox.net Delivered-To: uclibc@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id DDCAB1BF5A3 for ; Thu, 10 Oct 2019 04:06:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id D719987CD7 for ; Thu, 10 Oct 2019 04:06:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dQOvuXEi21Ei for ; Thu, 10 Oct 2019 04:06:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by whitealder.osuosl.org (Postfix) with ESMTPS id AB98F87CD4 for ; Thu, 10 Oct 2019 04:06:04 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id 23so2794608pgk.3 for ; Wed, 09 Oct 2019 21:06:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=7AzIa8437MwRXLIhwwSQXIkV0cYTw4hpviwHCRh8Xe0=; b=eytK7y6CTWtznbj3maJvFRhXYftYRNHzBXT7OEBu1/Cuzaki7AMK5Se7gd9IzO1Kc+ o1pO2Tzb2JB9sLtc242tdKjLWg+2bqDTXHbECrpQ0L2Lov3m9TWeNLyjUgCikA9Sdyrz iCt2ofmZJKXmmflxqiYjUC3pWSTL7lNBM49RROzH/UbFFvKvVjZ9BFYp+72L2uHKBHu0 TsEGzrVIkU0JQqamWCIAmH8PCYkKOfTacIafmxYbZ/Va8Q7sInkKhAAckxhIrcfvYp+m HnZp5utEY/o7lNVhwTmfYVUG1uOxrcsGfrXMkCDite4JEFWSVqLORp7a/WYQO5qjvdjJ Hdog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=7AzIa8437MwRXLIhwwSQXIkV0cYTw4hpviwHCRh8Xe0=; b=C5g1C3OVwqAt8UxIEUgHE2QsLeMw0cKyVYFFcPESrRKYzGe6YmggVM0IUz0cT36hQ0 GKCJt052DhyIlzcslLfebikZ7XJjegNcZtDWzUS1eC605x9NqSUJVDwWFUEfX666yvqp zgpj/KHcUarvjrj0FpsPwpcBCBF5RTX1CYtKjQEDFgNUDBC1eY936+lJpV/UOL+5yD1J orlu8Qp6c8AtYiiGm3cfoHhqmdcFKgsHfJYdpqTQ4Bx8YZUXLjZL/NO6AO+C7c8Vz1JU hmVoziaOJH3I6KOSeVg7KxwuimcwgXzALkKART199FaBdop9i41+Y+yAP0mqC2OmDplC LxXQ== X-Gm-Message-State: APjAAAWdeDFaUopvTOhI6y2hNpn3yyhKetbUHYo71e7qLFVqNCfwHAuD o2xHQZNSlJ5w5UeLosLVRYt5MZjG X-Google-Smtp-Source: APXvYqwWe4QNPdWTvyjn3hMpPXqRg9YyuhUGej97YzpSOhQznP5Co/Smej63ybPMCo8Y/i2p3OEf6g== X-Received: by 2002:a65:50c5:: with SMTP id s5mr5924113pgp.52.1570680363856; Wed, 09 Oct 2019 21:06:03 -0700 (PDT) Received: from DESKTOP-VIRSTQA.lan ([69.42.0.147]) by smtp.gmail.com with ESMTPSA id h66sm7472729pjb.0.2019.10.09.21.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Oct 2019 21:06:03 -0700 (PDT) From: Rosen Penev To: uclibc@uclibc.org, rep.dot.nop@gmail.com Subject: [PATCH] ios: Don't return & for fpos - and + operators Date: Wed, 9 Oct 2019 21:06:00 -0700 Message-Id: <20191010040600.364-1-rosenp@gmail.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-BeenThere: uclibc@uclibc.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion and development of uClibc \(the embedded C library\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: uclibc-bounces@uclibc.org Sender: "uClibc" Throws a Weffc++ warning: warning: ‘std::fpos& std::fpos::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 --- 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; }