[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buffer size limitation in insdel.c
From: |
Lars Magne Ingebrigtsen |
Subject: |
Re: Buffer size limitation in insdel.c |
Date: |
Thu, 23 Sep 2010 16:31:21 +0200 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
Lars Magne Ingebrigtsen <address@hidden> writes:
> So the warning is incorrect -- it's no longer a Lisp_Object at that
> point. But it's correct in that it's a potentially problematic
> conversion.
Yup. It's just naming the original type before the cast, apparently.
Like here:
dispnew.c:520: warning: conversion to 'int' from 'Lisp_Object' may alter its
value
int width = XFASTINT (w->total_cols);
While stuff that's already EMACS_INT get the more correct warning:
dispnew.c:4708: warning: conversion to 'int' from 'long int' may alter its
value
int preempt_count = baud_rate / 2400 + 1;
I think you're right that it might be more productive to just read the
code than using -Wconversion. That means that we'll never be able to
get the compiler to warn us the next time somebody writes int i = Z;,
which is a shame. Compilers are really good at finding type errors.
:-)
--
(domestic pets only, the antidote for overdose, milk.)
address@hidden * Lars Magne Ingebrigtsen
- Re: Buffer size limitation in insdel.c, (continued)
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Andreas Schwab, 2010/09/23
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c,
Lars Magne Ingebrigtsen <=
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/23
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/23
- Re: Buffer size limitation in insdel.c, Richard Stallman, 2010/09/24
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/24
- Re: Buffer size limitation in insdel.c, Lars Magne Ingebrigtsen, 2010/09/24
- Re: Buffer size limitation in insdel.c, Eli Zaretskii, 2010/09/25