opcodes: bfin: simplify field width processing and fix build warnings
[deliverable/binutils-gdb.git] / gdb / completer.c
index 18f01f9f8548f2cd4614af06600c73917ae23a15..5939d08124e442b58ed3250af8184392a692c3a7 100644 (file)
@@ -1,6 +1,5 @@
 /* Line completion stuff for GDB, the GNU debugger.
-   Copyright (C) 2000, 2001, 2007, 2008, 2009, 2010, 2011
-   Free Software Foundation, Inc.
+   Copyright (C) 2000-2001, 2007-2012 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -387,7 +386,7 @@ add_struct_fields (struct type *type, int *nextp, char **output,
 {
   int i;
   int computed_type_name = 0;
-  char *type_name = NULL;
+  const char *type_name = NULL;
 
   CHECK_TYPEDEF (type);
   for (i = 0; i < TYPE_NFIELDS (type); ++i)
@@ -417,7 +416,7 @@ add_struct_fields (struct type *type, int *nextp, char **output,
 
   for (i = TYPE_NFN_FIELDS (type) - 1; i >= 0; --i)
     {
-      char *name = TYPE_FN_FIELDLIST_NAME (type, i);
+      const char *name = TYPE_FN_FIELDLIST_NAME (type, i);
 
       if (name && ! strncmp (name, fieldname, namelen))
        {
@@ -590,7 +589,7 @@ complete_line_internal (const char *text,
     {
       /* An empty line we want to consider ambiguous; that is, it
         could be any command.  */
-      c = (struct cmd_list_element *) -1;
+      c = CMD_LIST_AMBIGUOUS;
       result_list = 0;
     }
   else
@@ -610,7 +609,7 @@ complete_line_internal (const char *text,
         possible completions.  */
       list = NULL;
     }
-  else if (c == (struct cmd_list_element *) -1)
+  else if (c == CMD_LIST_AMBIGUOUS)
     {
       char *q;
 
This page took 0.024115 seconds and 4 git commands to generate.