emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Commit "Omit unused frame argument of font API's close function." br


From: Claudio Bley
Subject: Re: Commit "Omit unused frame argument of font API's close function." breaks build and segfaults
Date: Fri, 25 Oct 2013 14:40:52 +0200
User-agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Goj┼Ź) APEL/10.8 Emacs/24.3.50 (i686-pc-mingw32) MULE/6.0 (HANACHIRUSATO)

At Fri, 25 Oct 2013 12:56:52 +0300,
Eli Zaretskii wrote:
> 
> > From: address@hidden (Claudio Bley)
> > Date: Fri, 25 Oct 2013 10:57:36 +0200
> > 
> > Since commit address@hidden I receive these build failures:
> > 
> > gcc  -std=gnu99 -c -mtune=pentium4  
> > -I/c/Users/Claudio/src/emacs-dep/stage/include -DUSE_CRT_DLL=1 -I 
> > /c/Users/Claudio/build/emacs-w32/../../src/emacs/nt/inc -Demacs  -I. 
> > -I../../../src/emacs/src -I../lib -I../../../src/emacs/src/../lib  
> > -mtune=pentium4      -Ic:/Users/Claudio/src/emacs-dep/stage/include/libxml2 
> >           -MMD -MF deps/w32font.d -MP 
> > -Ic:/Users/Claudio/src/emacs-dep/stage/include 
> > -IC:/Users/Claudio/src/emacs-dep/stage/include      -g3 -O2 -gdwarf-2  
> > ../../../src/emacs/src/w32font.c
> > ../../../src/emacs/src/w32font.c:381:1: error: conflicting types for 
> > 'w32font_close'
> > In file included from ../../../src/emacs/src/w32font.c:35:0:
> > ../../../src/emacs/src/w32font.h:75:6: note: previous declaration of 
> > 'w32font_close' was here
> > ../../../src/emacs/src/w32font.c: In function 'w32font_close':
> > ../../../src/emacs/src/w32font.c:394:9: error: 'i' undeclared (first use in 
> > this function)
> > ../../../src/emacs/src/w32font.c:394:9: note: each undeclared identifier is 
> > reported only once for each function it appears in
> > make[1]: *** [w32font.o] Error 1
> > gcc  -std=gnu99 -c -mtune=pentium4  
> > -I/c/Users/Claudio/src/emacs-dep/stage/include -DUSE_CRT_DLL=1 -I 
> > /c/Users/Claudio/build/emacs-w32/../../src/emacs/nt/inc -Demacs  -I. 
> > -I../../../src/emacs/src -I../lib -I../../../src/emacs/src/../lib  
> > -mtune=pentium4      -Ic:/Users/Claudio/src/emacs-dep/stage/include/libxml2 
> >           -MMD -MF deps/w32term.d -MP 
> > -Ic:/Users/Claudio/src/emacs-dep/stage/include 
> > -IC:/Users/Claudio/src/emacs-dep/stage/include      -g3 -O2 -gdwarf-2  
> > ../../../src/emacs/src/w32term.c
> > gcc  -std=gnu99 -c -mtune=pentium4  
> > -I/c/Users/Claudio/src/emacs-dep/stage/include -DUSE_CRT_DLL=1 -I 
> > /c/Users/Claudio/build/emacs-w32/../../src/emacs/nt/inc -Demacs  -I. 
> > -I../../../src/emacs/src -I../lib -I../../../src/emacs/src/../lib  
> > -mtune=pentium4      -Ic:/Users/Claudio/src/emacs-dep/stage/include/libxml2 
> >           -MMD -MF deps/w32uniscribe.d -MP 
> > -Ic:/Users/Claudio/src/emacs-dep/stage/include 
> > -IC:/Users/Claudio/src/emacs-dep/stage/include      -g3 -O2 -gdwarf-2  
> > ../../../src/emacs/src/w32uniscribe.c
> > ../../../src/emacs/src/w32uniscribe.c:975:5: warning: initialization from 
> > incompatible pointer type [enabled by default]
> > ../../../src/emacs/src/w32uniscribe.c:975:5: warning: (near initialization 
> > for 'uniscribe_font_driver.sys_close') [enabled by default]
> > 
> > After fixing it that way:
> > 
> > ---- 8< ----------------------- >8 -----------------------------------1
> > diff --git a/src/w32font.c b/src/w32font.c
> > index dd21aca..d308a09 100644
> > --- a/src/w32font.c
> > +++ b/src/w32font.c
> > @@ -391,6 +391,7 @@ w32font_close (struct font *font)
> >        /* Free all the cached metrics.  */
> >        if (w32_font->cached_metrics)
> >         {
> > +    int i;
> >           for (i = 0; i < w32_font->n_cache_blocks; i++)
> >               xfree (w32_font->cached_metrics[i]);
> >           xfree (w32_font->cached_metrics);
> > diff --git a/src/w32font.h b/src/w32font.h
> > index 5622086..1991492 100644
> > --- a/src/w32font.h
> > +++ b/src/w32font.h
> > @@ -72,7 +72,7 @@ Lisp_Object w32font_match_internal (struct frame *f,
> >                                      int opentype_only);
> >  int w32font_open_internal (struct frame *f, Lisp_Object font_entity,
> >                             int pixel_size, Lisp_Object font_object);
> > -void w32font_close (struct frame *f, struct font *font);
> > +void w32font_close (struct font *font);
> >  int w32font_has_char (Lisp_Object entity, int c);
> >  int w32font_text_extents (struct font *font, unsigned *code, int nglyphs,
> >                            struct font_metrics *metrics);
> > diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
> > index b31baa0..d8873da 100644
> > --- a/src/w32uniscribe.c
> > +++ b/src/w32uniscribe.c
> > @@ -143,7 +143,7 @@ uniscribe_close (struct frame *f, struct font *font)
> >    if (uniscribe_font->cache)
> >      ScriptFreeCache (&(uniscribe_font->cache));
> > 
> > -  w32font_close (f, font);
> > +  w32font_close (font);
> >  }
> > 
> >  /* Return a list describing which scripts/languages FONT supports by
> > ------ 8< ----------------------- >8 ---------------------------------
> > 
> > "emacs -Q" segfaults when starting:
> > 
> > Program received signal SIGSEGV, Segmentation fault.
> > _free_internal_nolock (ptr=0x39b4) at ../../../src/emacs/src/gmalloc.c:1056
> > 1056              _heapinfo[block].free.size = 
> > _heapinfo[block].busy.info.size;
> 
> Please try again, I hope I fixed these problems now.

Thanks, it's fixed indeed.
-- 
Claudio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]