From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.devel Subject: Re: Buffer size limitation in insdel.c Date: Thu, 23 Sep 2010 15:12:40 +0200 Message-ID: References: <834odivv7v.fsf@gnu.org> <83r5gkvqpf.fsf@gnu.org> <83iq1wvep4.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1285247585 25364 80.91.229.12 (23 Sep 2010 13:13:05 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 23 Sep 2010 13:13:05 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Sep 23 15:13:03 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oylbh-0006Un-Ui for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2010 15:13:02 +0200 Original-Received: from localhost ([127.0.0.1]:60484 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oylbh-0004jU-97 for ged-emacs-devel@m.gmane.org; Thu, 23 Sep 2010 09:13:01 -0400 Original-Received: from [140.186.70.92] (port=48925 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OylbZ-0004jP-O9 for emacs-devel@gnu.org; Thu, 23 Sep 2010 09:12:56 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OylbU-0001sp-7f for emacs-devel@gnu.org; Thu, 23 Sep 2010 09:12:53 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.10]:59485) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OylbU-0001rz-2m for emacs-devel@gnu.org; Thu, 23 Sep 2010 09:12:48 -0400 Original-Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 6C1511C00428 for ; Thu, 23 Sep 2010 15:12:41 +0200 (CEST) Original-Received: from hase.home (ppp-88-217-115-11.dynamic.mnet-online.de [88.217.115.11]) by mail.mnet-online.de (Postfix) with ESMTP id 05AE31C0026E for ; Thu, 23 Sep 2010 15:12:40 +0200 (CEST) X-Yow: YOU'D cry too if it happened to YOU!! In-Reply-To: (Lars Magne Ingebrigtsen's message of "Thu, 23 Sep 2010 14:47:23 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130661 Archived-At: Lars Magne Ingebrigtsen writes: > dispnew.c:783: warning: conversion to 'int' from 'Lisp_Object' may alter its value This is an obvious bug. A Lisp_Object value must never be treated as an integer, and this will fail to compile with --enable-use-lisp-union-type (which is a good idea to enable during development). > dispnew.c:2178: warning: conversion to 'long unsigned int' from 'short int' may change the sign of the result > > size_t nbytes = from->used[TEXT_AREA] * sizeof (struct glyph); This is only a problem if from->used[TEXT_AREA] can be negative, which it can't. Might be worth to change to unsigned short. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."