Fri 30 Nov 2001

  • gcc: You learn something new every day. Consider a function like:

    static void foo (void) { foo (); }

    This static function calls itself, and nothing else in the .c file calls it. As a result, the -Wunused-function argument won’t actually warn you that foo() is unused at compilation time. I found a 500 line recursive function in gtktreeview.c yesterday that was unused. Removing that function got that file under 10KLOC again. It’s still pretty unmanageable, but it’s a step in the right direction.