comparison src/gc.c @ 5016:2ade80e8c640

enable more warnings and fix them -------------------- ChangeLog entries follow: -------------------- ChangeLog addition: 2010-02-08 Ben Wing <ben@xemacs.org> * configure: * configure.ac (TAB): Various warnings that used to be present had mistakenly gotten turned off. Turn them back on. lwlib/ChangeLog addition: 2010-02-08 Ben Wing <ben@xemacs.org> * xt-wrappers.h: * xt-wrappers.h (Xt_SET_VALUE): * xt-wrappers.h (Xt_GET_VALUE): Rename var to avoid shadowing problems. src/ChangeLog addition: 2010-02-08 Ben Wing <ben@xemacs.org> * alloc.c: Add prototypes for debugging functions. * alloc.c (compact_string_chars): Make static. * console-x.c (x_initially_selected_for_input): * console-x.h: * console-x.h (X_ERROR_OCCURRED): Delete x_has_keysym() prototype from console-x.c, move to console-x.h. * eval.c (multiple_value_call): Real bug: Fix shadowing local vars. * event-unixoid.c (read_event_from_tty_or_stream_desc): * event-unixoid.c (signal_fake_event): * lread.c (check_if_suppressed): * strftime.c (strftime): Fix stupid global shadowing warnings. * event-unixoid.c (signal_fake_event): * event-unixoid.c (drain_signal_event_pipe): Use Rawbyte, not char. * frame.h: Remove old prototype. * gc.c: * gc.c (show_gc_cursor_and_message): * gc.c (remove_gc_cursor_and_message): * gc.c (gc_prepare): * gc.c (gc_finish_mark): * gc.c (gc_finalize): * gc.c (gc_sweep): * gc.c (gc_finish): * gc.c (gc_suspend_mark_phase): * gc.c (gc_resume_mark_phase): * gc.c (gc_mark): * gc.c (gc_resume_mark): Make fns static. * glyphs-eimage.c (gif_decode_error_string): Fix non-prototype. * lisp.h: Hack around global shadowing warnings involving `index'. * intl-win32.c (wcsncpy): * number-gmp.c (bigfloat_to_string): * objects-msw.c (mswindows_font_spec_matches_charset_stage_2): * specifier.c (call_charset_predicate): * specifier.c (DEFINE_SPECIFIER_TAG_FROB): Declarations cannot follow statements in standard C. * search.c (search_buffer): Fix local shadowing warnings.
author Ben Wing <ben@xemacs.org>
date Mon, 08 Feb 2010 21:28:57 -0600
parents c2e0c3af5fe3
children d4f666cda5e6
comparison
equal deleted inserted replaced
5015:d95c102a96d3 5016:2ade80e8c640
1447 /* Maximum amount of C stack to save when a GC happens. */ 1447 /* Maximum amount of C stack to save when a GC happens. */
1448 #ifndef MAX_SAVE_STACK 1448 #ifndef MAX_SAVE_STACK
1449 #define MAX_SAVE_STACK 0 /* 16000 */ 1449 #define MAX_SAVE_STACK 0 /* 16000 */
1450 #endif 1450 #endif
1451 1451
1452 void 1452 static void
1453 show_gc_cursor_and_message (void) 1453 show_gc_cursor_and_message (void)
1454 { 1454 {
1455 /* Now show the GC cursor/message. */ 1455 /* Now show the GC cursor/message. */
1456 pre_gc_cursor = Qnil; 1456 pre_gc_cursor = Qnil;
1457 cursor_changed = 0; 1457 cursor_changed = 0;
1504 } 1504 }
1505 } 1505 }
1506 } 1506 }
1507 } 1507 }
1508 1508
1509 void 1509 static void
1510 remove_gc_cursor_and_message (void) 1510 remove_gc_cursor_and_message (void)
1511 { 1511 {
1512 /* Now remove the GC cursor/message */ 1512 /* Now remove the GC cursor/message */
1513 if (!noninteractive) 1513 if (!noninteractive)
1514 { 1514 {
1534 } 1534 }
1535 } 1535 }
1536 } 1536 }
1537 } 1537 }
1538 1538
1539 void 1539 static void
1540 gc_prepare (void) 1540 gc_prepare (void)
1541 { 1541 {
1542 #if MAX_SAVE_STACK > 0 1542 #if MAX_SAVE_STACK > 0
1543 char stack_top_variable; 1543 char stack_top_variable;
1544 extern char *stack_bottom; 1544 extern char *stack_bottom;
1602 clear_event_resource (); 1602 clear_event_resource ();
1603 cleanup_specifiers (); 1603 cleanup_specifiers ();
1604 cleanup_buffer_undo_lists (); 1604 cleanup_buffer_undo_lists ();
1605 } 1605 }
1606 1606
1607 void 1607 static void
1608 gc_mark_root_set ( 1608 gc_mark_root_set (
1609 #ifdef NEW_GC 1609 #ifdef NEW_GC
1610 enum gc_phase phase 1610 enum gc_phase phase
1611 #else /* not NEW_GC */ 1611 #else /* not NEW_GC */
1612 void 1612 void
1709 #ifdef USE_KKCC 1709 #ifdef USE_KKCC
1710 # undef mark_object 1710 # undef mark_object
1711 #endif 1711 #endif
1712 } 1712 }
1713 1713
1714 void 1714 static void
1715 gc_finish_mark (void) 1715 gc_finish_mark (void)
1716 { 1716 {
1717 #ifdef NEW_GC 1717 #ifdef NEW_GC
1718 GC_SET_PHASE (FINISH_MARK); 1718 GC_SET_PHASE (FINISH_MARK);
1719 #endif /* NEW_GC */ 1719 #endif /* NEW_GC */
1756 prune_ephemerons (); 1756 prune_ephemerons ();
1757 prune_weak_boxes (); 1757 prune_weak_boxes ();
1758 } 1758 }
1759 1759
1760 #ifdef NEW_GC 1760 #ifdef NEW_GC
1761 void 1761 static void
1762 gc_finalize (void) 1762 gc_finalize (void)
1763 { 1763 {
1764 GC_SET_PHASE (FINALIZE); 1764 GC_SET_PHASE (FINALIZE);
1765 register_for_finalization (); 1765 register_for_finalization ();
1766 } 1766 }
1767 1767
1768 void 1768 static void
1769 gc_sweep (void) 1769 gc_sweep (void)
1770 { 1770 {
1771 GC_SET_PHASE (SWEEP); 1771 GC_SET_PHASE (SWEEP);
1772 mc_sweep (); 1772 mc_sweep ();
1773 } 1773 }
1774 #endif /* NEW_GC */ 1774 #endif /* NEW_GC */
1775 1775
1776 1776
1777 void 1777 static void
1778 gc_finish (void) 1778 gc_finish (void)
1779 { 1779 {
1780 #ifdef NEW_GC 1780 #ifdef NEW_GC
1781 GC_SET_PHASE (FINISH_GC); 1781 GC_SET_PHASE (FINISH_GC);
1782 #endif /* NEW_GC */ 1782 #endif /* NEW_GC */
1813 GC_SET_PHASE (NONE); 1813 GC_SET_PHASE (NONE);
1814 #endif /* NEW_GC */ 1814 #endif /* NEW_GC */
1815 } 1815 }
1816 1816
1817 #ifdef NEW_GC 1817 #ifdef NEW_GC
1818 void 1818 static void
1819 gc_suspend_mark_phase (void) 1819 gc_suspend_mark_phase (void)
1820 { 1820 {
1821 PROFILE_RECORD_EXITING_SECTION (QSin_garbage_collection); 1821 PROFILE_RECORD_EXITING_SECTION (QSin_garbage_collection);
1822 write_barrier_enabled = 1; 1822 write_barrier_enabled = 1;
1823 consing_since_gc = 0; 1823 consing_since_gc = 0;
1824 vdb_start_dirty_bits_recording (); 1824 vdb_start_dirty_bits_recording ();
1825 } 1825 }
1826 1826
1827 int 1827 static int
1828 gc_resume_mark_phase (void) 1828 gc_resume_mark_phase (void)
1829 { 1829 {
1830 PROFILE_RECORD_ENTERING_SECTION (QSin_garbage_collection); 1830 PROFILE_RECORD_ENTERING_SECTION (QSin_garbage_collection);
1831 assert (write_barrier_enabled); 1831 assert (write_barrier_enabled);
1832 vdb_stop_dirty_bits_recording (); 1832 vdb_stop_dirty_bits_recording ();
1833 write_barrier_enabled = 0; 1833 write_barrier_enabled = 0;
1834 return vdb_read_dirty_bits (); 1834 return vdb_read_dirty_bits ();
1835 } 1835 }
1836 1836
1837 int 1837 static int
1838 gc_mark (int incremental) 1838 gc_mark (int incremental)
1839 { 1839 {
1840 GC_SET_PHASE (MARK); 1840 GC_SET_PHASE (MARK);
1841 if (!incremental) 1841 if (!incremental)
1842 { 1842 {
1852 } 1852 }
1853 } 1853 }
1854 return 1; 1854 return 1;
1855 } 1855 }
1856 1856
1857 int 1857 static int
1858 gc_resume_mark (int incremental) 1858 gc_resume_mark (int incremental)
1859 { 1859 {
1860 if (!incremental) 1860 if (!incremental)
1861 { 1861 {
1862 if (!KKCC_GC_STACK_EMPTY) 1862 if (!KKCC_GC_STACK_EMPTY)