From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Compiler warnings in dispnew.c Date: Sun, 28 Nov 2021 17:56:30 +0800 Message-ID: <87fsrg7gdt.fsf@yahoo.com> References: <87fsrg7gdt.fsf.ref@yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="15591"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Nov 28 10:57:49 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mrGwN-0003uL-Tt for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 10:57:48 +0100 Original-Received: from localhost ([::1]:45146 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mrGwM-0000UQ-79 for ged-emacs-devel@m.gmane-mx.org; Sun, 28 Nov 2021 04:57:46 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mrGvK-0007wp-0r for emacs-devel@gnu.org; Sun, 28 Nov 2021 04:56:43 -0500 Original-Received: from sonic311-23.consmr.mail.ne1.yahoo.com ([66.163.188.204]:34662) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mrGvH-0005QY-AO for emacs-devel@gnu.org; Sun, 28 Nov 2021 04:56:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638093397; bh=omgrtcpw4lV2AmlPNw5lcn02YohiVhdyd8jITgnlY0Y=; h=From:To:Subject:Date:References:From:Subject:Reply-To; b=ATrJ1x9zY1fvQdjCOvCgo0xWc8zUbKedZsCYCeC/I1Fxk6/kZDoseMF8OtMF3BrOFmN6InMS9n1oEyzp4z97Tmi1DrIODnEPSBuRJ7CICi7QPt+o21k1G3pbMunuu+/yuS8R3mLuPHz2Bv3uQWSvlZDeubcLi0Uvv8g0XLO6qtQ06rMqGB3+tILuNV9sePOnv2cY/40pqdXToAIinpymRXPVkcXAexaJ5yL/hAYokzljtjs2rKV069Li2wWZ79QiIADDS+T3zdC9q94bQtjCQS34Jf6vxi+8kzDSEC1AndOTwYdDIYpsPLU0rO9zDCdXs9Igyn0cvz05Lb+xBqAjwg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1638093397; bh=Khmxxq4e4CHN3TEyEQLEwSVwHc/Ti/F4W3m2vHY92SN=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=c1Gc+9HLsQ+1CWRo7XGnjQdecwjOkvChqlCxePhWewUls6QNCCSny/7NN1w0QW4/hgV+189fo54dwEMeK+pyiKog01ZEFkx0G0g5uS5xoZyQMgZ8GZ/Ac9WkRFfZ3ktJzUyVV/10qniiOF6/+B7FPHyid1hYeAFID3PA1JaNr/2rUQW6WFr8N01RolCeBT2oN2mWHf4uCIl3vABz2nEITWjTYew/WpkOezTq/CsN6JHF0SACEafi7MsW3bXUvNngThhAsANwh/UscuMM1uhJb/ijNIcVbijb3XfEJBcONTebZ/3LZuZ7nEfgGgrykTcZBYIi1HCV7BZEcptpQFmPJQ== X-YMail-OSG: kYbnF8oVM1mQ8yc1ud6jr4D1Qq4fcnPnZerrmzKMq2GhwBt8ycbb47b1Mv5t8JS OTfkySBiMxUtJx0dE2gvEKfdf_U_MCohIUIAyUOS6101hLiQH8TDQ7tF8k0D5NfV8BI23BVery_U vnDCX7Km6g1OSr3W3pf7iSQ13hzn_SnA9AfwA6jy1SF0ijoMKAttsRM3HtZe8EvrnxOuI6PCX71v WEVuwHWavFckT8ZXubuSFEpIs8HdcSfkalJs9Yftk8TKg6RpPV4BV7wqEMruYcg0y8w0Wtj0I2vL 2x5xx121q1tjmWX39japkq8UP5IC1ymnaiG7k0aL2Fxp4OwDJmjq2vK_iEo_xym9PpB19dOA9fqC M0rltsULIXscLAKKrxt4zqxx0_JQe7q3WEHBxxhz_FYSh2G0Hf15gpMN7RwHJ3njAt2t1BIYfn3J XlUg39o_cQu6YM6c8oODmmMQ285.XG.p9xS0fxp7.xhkLW85vByyM507b6cw1ubG36t5n6qZOyzV gGPENouTlRM50s5L14Pc498iPVsk.0dJNrelOeR4zmkORBNHZL.2uUa1jzBj3k4Pprp_0zOPngOe .IwhAmIUfqG7FtkRaS5mK4e0HNlDSb56F2PLWeUFs_yJwqkev2mC.6wa234FHPPXTaTOzGaMs5c5 8SOMjZpOdw_TCixYWIY6OVEwpWyb_IGk2q_0B2iXwOg72oBlOUqTeAKEQ7kk6NuJq9HzanXevEiX 5kvzvjz7EF7Gw903hR.UPX80rW.ERCadijkFfOb3TUrUNS4NsqEHEQeQhuLdZ2yhsoxC7vjnTp4k R4pKw9Ug902cGEMrUcPc.bg1D3ad4RnGktsbJWeovg X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Sun, 28 Nov 2021 09:56:37 +0000 Original-Received: by kubenode510.mail-prod1.omega.sg3.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID a5c74b99c58fd99e9f30aa679989d452; Sun, 28 Nov 2021 09:56:34 +0000 (UTC) X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.188.204; envelope-from=luangruo@yahoo.com; helo=sonic311-23.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:280392 Archived-At: Building with checking, I get: CC dispnew.o In function =E2=80=98copy_row_except_pointers=E2=80=99, inlined from =E2=80=98assign_row=E2=80=99 at dispnew.c:1050:3, inlined from =E2=80=98mirror_make_current=E2=80=99 at dispnew.c:2761:3: dispnew.c:1037:3: warning: =E2=80=98memcpy=E2=80=99 offset [48, 255] from t= he object at =E2=80=98current_row=E2=80=99 is out of the bounds of referenc= ed subobject =E2=80=98x=E2=80=99 with type =E2=80=98int=E2=80=99 at offset = 44 [-Warray-bounds] 1037 | memcpy (&to->x, &from->x, sizeof *to - off); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from termchar.h:23, from dispnew.c:28: dispnew.c: In function =E2=80=98mirror_make_current=E2=80=99: dispextern.h:885:7: note: subobject =E2=80=98x=E2=80=99 declared here 885 | int x, y; | ^ In function =E2=80=98copy_row_except_pointers=E2=80=99, inlined from =E2=80=98assign_row=E2=80=99 at dispnew.c:1050:3, inlined from =E2=80=98make_current=E2=80=99 at dispnew.c:2719:3: dispnew.c:1037:3: warning: =E2=80=98memcpy=E2=80=99 offset [48, 255] from t= he object at =E2=80=98current_row=E2=80=99 is out of the bounds of referenc= ed subobject =E2=80=98x=E2=80=99 with type =E2=80=98int=E2=80=99 at offset = 44 [-Warray-bounds] 1037 | memcpy (&to->x, &from->x, sizeof *to - off); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from termchar.h:23, from dispnew.c:28: dispnew.c: In function =E2=80=98make_current=E2=80=99: dispextern.h:885:7: note: subobject =E2=80=98x=E2=80=99 declared here 885 | int x, y; | ^ In function =E2=80=98copy_row_except_pointers=E2=80=99, inlined from =E2=80=98assign_row=E2=80=99 at dispnew.c:1050:3, inlined from =E2=80=98scrolling_window=E2=80=99 at dispnew.c:4445:4, inlined from =E2=80=98update_window=E2=80=99 at dispnew.c:3651:13: dispnew.c:1037:3: warning: =E2=80=98memcpy=E2=80=99 offset [48, 255] from t= he object at =E2=80=98c=E2=80=99 is out of the bounds of referenced subobje= ct =E2=80=98x=E2=80=99 with type =E2=80=98int=E2=80=99 at offset 44 [-Warra= y-bounds] 1037 | memcpy (&to->x, &from->x, sizeof *to - off); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from termchar.h:23, from dispnew.c:28: dispnew.c: In function =E2=80=98update_window=E2=80=99: dispextern.h:885:7: note: subobject =E2=80=98x=E2=80=99 declared here 885 | int x, y; | ^ In function =E2=80=98copy_row_except_pointers=E2=80=99, inlined from =E2=80=98assign_row=E2=80=99 at dispnew.c:1050:3, inlined from =E2=80=98scrolling_window=E2=80=99 at dispnew.c:4768:6, inlined from =E2=80=98update_window=E2=80=99 at dispnew.c:3651:13: dispnew.c:1037:3: warning: =E2=80=98memcpy=E2=80=99 offset [48, 255] from t= he object at =E2=80=98to=E2=80=99 is out of the bounds of referenced subobj= ect =E2=80=98x=E2=80=99 with type =E2=80=98int=E2=80=99 at offset 44 [-Warr= ay-bounds] 1037 | memcpy (&to->x, &from->x, sizeof *to - off); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from termchar.h:23, from dispnew.c:28: dispnew.c: In function =E2=80=98update_window=E2=80=99: dispextern.h:885:7: note: subobject =E2=80=98x=E2=80=99 declared here 885 | int x, y; I think it would be prudent to fix this, thanks.