On Wed, May 28, 2003 at 12:54:57PM -0400, Thomas Dickey wrote:
>On Wed, May 28, 2003 at 05:20:15PM +0100, Dr Andrew C Aitchison wrote:
>> On Wed, 28 May 2003, Dr Andrew C Aitchison wrote:
>> 
>> > On Wed, 28 May 2003, Thomas Dickey wrote:
>> > 
>> > > On Wed, May 28, 2003 at 07:16:08AM -0600, Marc Aurele La France wrote:
>> > > > On Wed, 28 May 2003, Dr Andrew C Aitchison wrote:
>> > > > 
>> > > > > Patch 3.62 to xc/programs/xterm/screen.c breaks xterm resizing.
>> > > > > The call to SET_TTYSIZE no longer happens when TRACE isn't enabled.
>> > > > > Fix is to revert to version 3.61
>> > > > 
>> > > > OK.  I'll fix it.
>> > > 
>> > > presumably not by simply rolling back the change...
>> > 
>> > Why not ?
>> > 
>> > Old, working code:
>> > -    code = SET_TTYSIZE(screen->respond, ts);
>> > -    TRACE(("return %d from SET_TTYSIZE %dx%d\n", code, rows, cols));
>> > 
>> > New, broken code:
>> > +    TRACE(("return %d from SET_TTYSIZE %dx%d\n",
>> > +         SET_TTYSIZE(screen->respond, ts), rows, cols));
>> > 
>> > in the broken version since TRACE(...) is a null macro, cpp removes 
>> > the call to SET_TTYSIZE.
>> 
>> I take some ofthat back.
>> The version without code is definitely wrong.
>> The version with code is working, but is susceptible to optimization.

The function call can't be optimised out.

>My guess is that the compiler optimizer is broken, and discarding the
>assignment.  Apparently Marc is guessing the same thing, since he added a
>       (void)code;

Judging from the log messages, the original code (what Andrew quoted
as "old, working code") was functionally fine, but generated a
compiler warning, probably because 'code' was assigned a value that
was never used.  The '(void)code;' line should just silence that warning.

David
--
David Dawes
Founder/committer/developer                     The XFree86 Project
www.XFree86.org/~dawes
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to