Commit c339dc2e authored by Paul Eggert's avatar Paul Eggert

* emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,

so that we aren't warned about unused symbols.
parent 94578f9c
2011-04-16 Paul Eggert <eggert@cs.ucla.edu>
* emacs.c (MAX_HEAP_BSS_DIFF, my_edata): Move to where they're used,
so that we aren't warned about unused symbols.
* xfns.c (Fx_file_dialog): Rename local to avoid shadowing.
* xdisp.c (x_produce_glyphs): Avoid possibly-uninitialized
......
......@@ -164,10 +164,6 @@ static void *my_heap_start;
/* The gap between BSS end and heap start as far as we can tell. */
static unsigned long heap_bss_diff;
/* If the gap between BSS end and heap start is larger than this
output a warning in dump-emacs. */
#define MAX_HEAP_BSS_DIFF (1024*1024)
/* Nonzero means running Emacs without interactive terminal. */
int noninteractive;
......@@ -2100,7 +2096,6 @@ This is used in the file `loadup.el' when building Emacs.
You must run Emacs in batch mode in order to dump it. */)
(Lisp_Object filename, Lisp_Object symfile)
{
extern char my_edata[];
Lisp_Object tem;
Lisp_Object symbol;
int count = SPECPDL_INDEX ();
......@@ -2111,6 +2106,10 @@ You must run Emacs in batch mode in order to dump it. */)
error ("Dumping Emacs works only in batch mode");
#ifdef GNU_LINUX
/* Warn if the gap between BSS end and heap start is larger than this. */
# define MAX_HEAP_BSS_DIFF (1024*1024)
if (heap_bss_diff > MAX_HEAP_BSS_DIFF)
{
fprintf (stderr, "**************************************************\n");
......@@ -2157,7 +2156,10 @@ You must run Emacs in batch mode in order to dump it. */)
#ifndef WINDOWSNT
/* On Windows, this was done before dumping, and that once suffices.
Meanwhile, my_edata is not valid on Windows. */
memory_warnings (my_edata, malloc_warning);
{
extern char my_edata[];
memory_warnings (my_edata, malloc_warning);
}
#endif /* not WINDOWSNT */
#if defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT
/* Pthread may call malloc before main, and then we will get an endless
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment