summaryrefslogtreecommitdiffstats
path: root/gcc/java/class.c
diff options
context:
space:
mode:
authorghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-12-31 03:30:22 +0000
committerghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4>1999-12-31 03:30:22 +0000
commit4e46d7280db1a0ef856edbb4a9e9a2d310d8d2de (patch)
treef85ebd132a52c9f4368a95dcbccd79d8403b7c9d /gcc/java/class.c
parentd95aff3a26f7a66dd23d44ef46e4366c8493e0a0 (diff)
downloadppe42-gcc-4e46d7280db1a0ef856edbb4a9e9a2d310d8d2de.tar.gz
ppe42-gcc-4e46d7280db1a0ef856edbb4a9e9a2d310d8d2de.zip
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31148 138bc75d-0d04-0410-961f-82ee72b054a4
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 e042c131931..3e3cfe63550 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;
{
OpenPOWER on IntegriCloud