X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=gdb%2Fobserver.c;h=aee25842d7d904babdd711df21d64bc9b0650d3f;hb=395b0d8a3fdd8915a4897b9b925d56fa42745dcc;hp=de59ac67da23995cfd7c4ea5938ae21945360aa5;hpb=0df8b4180acb4890d058c92753dafcd4ff0a87d1;p=deliverable%2Fbinutils-gdb.git diff --git a/gdb/observer.c b/gdb/observer.c index de59ac67da..aee25842d7 100644 --- a/gdb/observer.c +++ b/gdb/observer.c @@ -1,7 +1,6 @@ /* GDB Notifications to Observers. - Copyright (C) 2003, 2004, 2007, 2008, 2009, 2010, 2011 - Free Software Foundation, Inc. + Copyright (C) 2003-2015 Free Software Foundation, Inc. This file is part of GDB. @@ -55,7 +54,7 @@ #include "command.h" #include "gdbcmd.h" -static int observer_debug; +static unsigned int observer_debug; static void show_observer_debug (struct ui_file *file, int from_tty, struct cmd_list_element *c, const char *value) @@ -90,9 +89,9 @@ struct observer_list static struct observer_list * xalloc_observer_list_node (void) { - struct observer_list *node = XMALLOC (struct observer_list); + struct observer_list *node = XNEW (struct observer_list); - node->observer = XMALLOC (struct observer); + node->observer = XNEW (struct observer); return node; } @@ -182,6 +181,11 @@ int observer_test_first_observer = 0; int observer_test_second_observer = 0; int observer_test_third_observer = 0; +/* Provide prototypes to silence -Wmissing-prototypes. */ +extern void observer_test_first_notification_function (int arg); +extern void observer_test_second_notification_function (int arg); +extern void observer_test_third_notification_function (int arg); + void observer_test_first_notification_function (int arg) { @@ -205,14 +209,14 @@ extern initialize_file_ftype _initialize_observer; /* -Wmissing-prototypes */ void _initialize_observer (void) { - add_setshow_zinteger_cmd ("observer", class_maintenance, - &observer_debug, _("\ + add_setshow_zuinteger_cmd ("observer", class_maintenance, + &observer_debug, _("\ Set observer debugging."), _("\ Show observer debugging."), _("\ When non-zero, observer debugging is enabled."), - NULL, - show_observer_debug, - &setdebuglist, &showdebuglist); + NULL, + show_observer_debug, + &setdebuglist, &showdebuglist); } #include "observer.inc"