diff options
Diffstat (limited to 'src/java-utils.c')
-rw-r--r-- | src/java-utils.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/java-utils.c b/src/java-utils.c index fb95cf5..1ea7783 100644 --- a/src/java-utils.c +++ b/src/java-utils.c @@ -29,14 +29,12 @@ #include <glib.h> #include "java-utils.h" - /* * The following code conforms to the JVM specification.(Java 2 Platform) * For further changes to the classfile structure, please update the * following macros. */ - /* Tags that identify structures */ #define CONST_CLASS 7 @@ -63,7 +61,6 @@ #define CONST_DOUBLE_INFO 8 #define CONST_NAMEANDTYPE_INFO 4 - /* represents the utf8 strings in class file */ struct utf_string { @@ -107,7 +104,6 @@ typedef struct { #endif } JavaClassFile; - static JavaClassFile* java_class_file_new (void) { @@ -119,7 +115,6 @@ java_class_file_new (void) return cfile; } - static void java_class_file_free (JavaClassFile *cfile) { @@ -142,7 +137,6 @@ java_class_file_free (JavaClassFile *cfile) g_free (cfile); } - /* The following function loads the utf8 strings and class structures from the * class file. */ static void @@ -231,7 +225,6 @@ load_constant_pool_utfs (JavaClassFile *cfile) #endif } - static char* close_and_exit (JavaClassFile *cfile) { @@ -239,7 +232,6 @@ close_and_exit (JavaClassFile *cfile) return NULL; } - /* This function extracts the package name from a class file */ char* get_package_name_from_class_file (char *fname) @@ -305,9 +297,9 @@ get_package_name_from_class_file (char *fname) if (package != NULL) { int j; - for (j = length; (j >= 0) && (end == 0); j--) + for (j = (int) length; (j >= 0) && (end == 0); j--) if (package[j] == '/') - end = j; + end = (guint16) j; char *package_padded = g_strndup (package, end); g_free(package); package = package_padded; @@ -318,7 +310,6 @@ get_package_name_from_class_file (char *fname) return package; } - /* This function consumes a comment from the java file * multiline = TRUE implies that comment is multiline */ static void @@ -360,7 +351,6 @@ consume_comment (int fdesc, } } - /* This function extracts package name from a java file */ char* get_package_name_from_java_file (char *fname) |