aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/class.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1999-12-31 03:30:22 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1999-12-31 03:30:22 +0000
commitc63b98cdad0bfd07d732fffbf6013893a919bfeb (patch)
treef85ebd132a52c9f4368a95dcbccd79d8403b7c9d /gcc/java/class.c
parent6bafd8b6e9fcf4c7a9606af4fc7965717c43a161 (diff)
downloadgcc-c63b98cdad0bfd07d732fffbf6013893a919bfeb.zip
gcc-c63b98cdad0bfd07d732fffbf6013893a919bfeb.tar.gz
gcc-c63b98cdad0bfd07d732fffbf6013893a919bfeb.tar.bz2
class.c (assume_compiled, [...]): Add static prototype.
* class.c (assume_compiled, assume_compiled_node): Add static prototype. (add_assume_compiled): Use xmalloc/xstrdup, not malloc/strdup. * jcf-dump.c (ARRAY_NEW_NUM): Cast long to int in switch. * jvgenmain.c (usage): Add static prototype with ATTRIBUTE_NORETURN. * parse.h (OBSOLETE_MODIFIER_WARNING): Rename parameter `modifier' to `__modifier' to avoid stringifying it. * parse.y (verify_constructor_circularity): Don't call a variadic function with a non-literal format string. (java_check_abstract_methods): Move unreachable code inside `continue' statement. (lookup_method_invoke): Call xstrdup, not strdup. * expr.c (expand_java_field_op): Avoid the use of ANSI string concatenation. * jcf-parse.c (yyparse): Likewise. * jv-scan.c (main): Likewise. From-SVN: r31148
Diffstat (limited to 'gcc/java/class.c')
-rw-r--r--gcc/java/class.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gcc/java/class.c b/gcc/java/class.c
index e042c13..3e3cfe6 100644
--- a/gcc/java/class.c
+++ b/gcc/java/class.c
@@ -47,6 +47,7 @@ static void append_gpp_mangled_type PROTO ((struct obstack *, tree));
static tree mangle_static_field PROTO ((tree));
static void add_interface_do PROTO ((tree, tree, int));
static tree maybe_layout_super_class PROTO ((tree, tree));
+static int assume_compiled PROTO ((const char *));
static rtx registerClass_libfunc;
@@ -75,6 +76,9 @@ typedef struct assume_compiled_node_struct
struct assume_compiled_node_struct *child;
} assume_compiled_node;
+static assume_compiled_node *find_assume_compiled_node
+ PROTO ((assume_compiled_node *, const char *));
+
/* This is the root of the include/exclude tree. */
static assume_compiled_node *assume_compiled_tree;
@@ -83,7 +87,7 @@ static assume_compiled_node *assume_compiled_tree;
is IDENT. Start the search from NODE. Return NULL if an
appropriate node does not exist. */
-assume_compiled_node *
+static assume_compiled_node *
find_assume_compiled_node (node, ident)
assume_compiled_node *node;
const char *ident;
@@ -131,9 +135,9 @@ add_assume_compiled (ident, excludep)
{
assume_compiled_node *parent;
assume_compiled_node *node =
- (assume_compiled_node *) malloc (sizeof (assume_compiled_node));
+ (assume_compiled_node *) xmalloc (sizeof (assume_compiled_node));
- node->ident = strdup (ident);
+ node->ident = xstrdup (ident);
node->excludep = excludep;
node->child = NULL;
@@ -142,7 +146,7 @@ add_assume_compiled (ident, excludep)
if (NULL == assume_compiled_tree)
{
assume_compiled_tree =
- (assume_compiled_node *) malloc (sizeof (assume_compiled_node));
+ (assume_compiled_node *) xmalloc (sizeof (assume_compiled_node));
assume_compiled_tree->ident = "";
assume_compiled_tree->excludep = 0;
assume_compiled_tree->sibling = NULL;
@@ -176,7 +180,7 @@ add_assume_compiled (ident, excludep)
/* Returns non-zero if IDENT is the name of a class that the compiler
should assume has been compiled to FIXME */
-int
+static int
assume_compiled (ident)
const char *ident;
{