Permalink
Browse files

Warning fixes from andreast

2005-08-31  Andreas Tobler  <a.tobler@schweiz.ch>

       * kaffe/kaffevm/classMethod.c
        (resolveStaticFields): Change index to unsigned.
        (computeInterfaceImplementationIndex): Change i to unsigned.

        * kaffe/kaffevm/string.c: Change argument type for stringHashValue to
        avoid compiler warnings.

        * libraries/clib/net/PlainDatagramSocketImpl.c
        (gnu_java_net_PlainDatagramSocketImpl_socketSetOption): Changed k to
        unsigned to avoid compiler warnings.
        (gnu_java_net_PlainDatagramSocketImpl_socketGetOption): Likewise.

        * replace/getaddrinfo.c: Change prototype for itoa_length to unsigned
        int.
  • Loading branch information...
1 parent ad96291 commit a266cf95c5b10a3414a1f2ada9ddd4aa502b9b56 robilad committed Aug 31, 2005
Showing with 29 additions and 9 deletions.
  1. +17 −0 ChangeLog
  2. +3 −2 kaffe/kaffevm/classMethod.c
  3. +2 −2 kaffe/kaffevm/string.c
  4. +4 −2 libraries/clib/net/PlainDatagramSocketImpl.c
  5. +3 −3 replace/getaddrinfo.c
View
17 ChangeLog
@@ -1,3 +1,20 @@
+2005-08-31 Andreas Tobler <a.tobler@schweiz.ch>
+
+ * kaffe/kaffevm/classMethod.c
+ (resolveStaticFields): Change index to unsigned.
+ (computeInterfaceImplementationIndex): Change i to unsigned.
+
+ * kaffe/kaffevm/string.c: Change argument type for stringHashValue to
+ avoid compiler warnings.
+
+ * libraries/clib/net/PlainDatagramSocketImpl.c
+ (gnu_java_net_PlainDatagramSocketImpl_socketSetOption): Changed k to
+ unsigned to avoid compiler warnings.
+ (gnu_java_net_PlainDatagramSocketImpl_socketGetOption): Likewise.
+
+ * replace/getaddrinfo.c: Change prototype for itoa_length to unsigned
+ int.
+
2005-08-27 Ito Kazumitsu <kaz@maczuka.gcd.org>
* libraries/clib/target/Linux/target_native_file.h
View
5 kaffe/kaffevm/classMethod.c
@@ -1932,7 +1932,7 @@ resolveStaticFields(Hjava_lang_Class* class, errorInfo *einfo)
constants* pool;
Utf8Const* utf8;
Field* fld;
- int idx;
+ unsigned int idx;
int n;
/* No locking here, assume class is already locked. */
@@ -2301,7 +2301,8 @@ buildInterfaceDispatchTable(Hjava_lang_Class* class, errorInfo *einfo)
static bool
computeInterfaceImplementationIndex(Hjava_lang_Class* clazz, errorInfo* einfo)
{
- int i, j, k;
+ int j, k;
+ unsigned int i;
int found_i;
bool rc = false;
Hjava_lang_Class** ifcs;
View
4 kaffe/kaffevm/string.c
@@ -26,7 +26,7 @@ static hashtab_t hashTable; /* intern hash table */
static iStaticLock stringLock; /* mutex on all intern operations */
/* Internal functions */
-static int stringHashValue(void *ptr);
+static int stringHashValue(const void *ptr);
static int stringCompare(const void *s1, const void *s2);
/*
@@ -358,7 +358,7 @@ stringUninternString(Hjava_lang_String* string)
* is getting written no matter who writes it (strings are immutable).
*/
static int
-stringHashValue(void *ptr)
+stringHashValue(const void *ptr)
{
Hjava_lang_String *string = (Hjava_lang_String*) ptr;
jint hash;
View
6 libraries/clib/net/PlainDatagramSocketImpl.c
@@ -421,7 +421,8 @@ void
gnu_java_net_PlainDatagramSocketImpl_socketSetOption(struct Hgnu_java_net_PlainDatagramSocketImpl* obj, jint opt, struct Hjava_lang_Object* arg)
{
struct Hjava_net_InetAddress* addrp;
- int k, v, r;
+ int v, r;
+ unsigned int k;
/* Do easy cases */
for (k = 0; k < sizeof(socketOptions) / sizeof(*socketOptions); k++) {
@@ -480,7 +481,8 @@ gnu_java_net_PlainDatagramSocketImpl_socketSetOption(struct Hgnu_java_net_PlainD
jint
gnu_java_net_PlainDatagramSocketImpl_socketGetOption(struct Hgnu_java_net_PlainDatagramSocketImpl* obj, jint opt)
{
- int k, r = 0, v;
+ int r = 0, v;
+ unsigned int k;
socklen_t vsize = sizeof(v);
struct sockaddr_in addr;
socklen_t alen = sizeof(addr);
View
6 replace/getaddrinfo.c
@@ -201,11 +201,11 @@ static pthread_mutex_t gai_mutex = PTHREAD_MUTEX_INITIALIZER;
#ifdef __STDC__
static int is_integer(const char *);
static int is_address(const char *);
-static int itoa_length(int);
+static unsigned int itoa_length(int);
#else
static int is_integer();
static int is_address();
-static int itoa_length();
+static unsigned int itoa_length();
#endif
/*
@@ -286,7 +286,7 @@ is_address(const char *s)
* Calcurate length of the string `s', where `s' is set by
* sprintf(s, "%d", n).
*/
-static int
+static unsigned int
itoa_length(int n)
{
int result = 1;

0 comments on commit a266cf9

Please sign in to comment.