You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by hi...@apache.org on 2010/03/18 23:48:42 UTC

svn commit: r925033 - in /harmony/enhanced/classlib/trunk/modules: imageio/src/main/native/jpegencoder/shared/ instrument/src/main/native/instrument/shared/ luni/src/main/native/launcher/shared/ luni/src/main/native/launcher/unix/ luni/src/main/native/...

Author: hindessm
Date: Thu Mar 18 22:48:41 2010
New Revision: 925033

URL: http://svn.apache.org/viewvc?rev=925033&view=rev
Log:
Removing unused code/variables.
Fixing readSymbolicLink for non-linux platforms as they can attempt to use
it and the code looks quite reasonable/portable.

Modified:
    harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/jpegencoder/shared/JpegEncoder.c
    harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/cmain.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/unix/main_hlp.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/vmls/shared/vmls.c
    harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ArrayAccessorImpl.c
    harmony/enhanced/classlib/trunk/modules/nio/src/main/native/nio/unix/EpollSelectorImpl.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/iohelp.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hynls.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyipcmutex.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hymem.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyshmem.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyshsem.c
    harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysock.c

Modified: harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/jpegencoder/shared/JpegEncoder.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/jpegencoder/shared/JpegEncoder.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/jpegencoder/shared/JpegEncoder.c (original)
+++ harmony/enhanced/classlib/trunk/modules/imageio/src/main/native/jpegencoder/shared/JpegEncoder.c Thu Mar 18 22:48:41 2010
@@ -55,7 +55,7 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM
 
 static JNIEnv* get_env() {
     JNIEnv *e;
-    int rt = (*jvm)->GetEnv(jvm, (void **)&e, JNI_VERSION_1_2);
+    (*jvm)->GetEnv(jvm, (void **)&e, JNI_VERSION_1_2);
     return e;
 }
 

Modified: harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c (original)
+++ harmony/enhanced/classlib/trunk/modules/instrument/src/main/native/instrument/shared/instrument.c Thu Mar 18 22:48:41 2010
@@ -203,7 +203,6 @@ JNIEXPORT void JNICALL Java_org_apache_h
     jmethodID method_get_data;
     jsize length;
     jvmtiClassDefinition *class_definitions;
-    int i=0;
     jclass clz;
     jmethodID method_clear;
 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/cmain.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/cmain.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/cmain.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/cmain.c Thu Mar 18 22:48:41 2010
@@ -43,58 +43,6 @@ extern UDATA VMCALL gpProtectedMain (voi
 extern int main_addVMDirToPath(int argc, char **argv, char **envp); 
 #endif /* HY_NO_THR */
 
-static UDATA VMCALL
-genericSignalHandler (struct HyPortLibrary *portLibrary, U_32 gpType,
-                      void *gpInfo, void *userData)
-{
-  PORT_ACCESS_FROM_PORT (portLibrary);
-  U_32 category;
-
-  hytty_printf (PORTLIB, "\nAn unhandled error (%d) has occurred.\n", gpType);
-
-  for (category = 0; category < HYPORT_SIG_NUM_CATEGORIES; category++)
-    {
-      U_32 infoCount = hysig_info_count (gpInfo, category);
-      U_32 infoKind, index;
-      void *value;
-      const char *name;
-
-      for (index = 0; index < infoCount; index++)
-        {
-          infoKind = hysig_info (gpInfo, category, index, &name, &value);
-
-          switch (infoKind)
-            {
-            case HYPORT_SIG_VALUE_32:
-              hytty_printf (PORTLIB, "%s=%08.8x\n", name, *(U_32 *) value);
-              break;
-            case HYPORT_SIG_VALUE_64:
-            case HYPORT_SIG_VALUE_FLOAT_64:
-              hytty_printf (PORTLIB, "%s=%016.16llx\n", name,
-                            *(U_64 *) value);
-              break;
-            case HYPORT_SIG_VALUE_STRING:
-              hytty_printf (PORTLIB, "%s=%s\n", name, (const char *) value);
-              break;
-            case HYPORT_SIG_VALUE_ADDRESS:
-              hytty_printf (PORTLIB, "%s=%p\n", name, *(void **) value);
-              break;
-            }
-        }
-    }
-
-  abort ();
-
-  /* UNREACHABLE */
-  return 0;
-}
-
-static UDATA VMCALL
-signalProtectedMain (HyPortLibrary * portLibrary, void *arg)
-{
-  return gpProtectedMain (arg);
-}
-
 #ifdef HY_NO_THR
 typedef I_32 (PVMCALL hyport_init_library_type) (struct HyPortLibrary *portLibrary,
 		struct HyPortLibraryVersion *version, 

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/shared/main.c Thu Mar 18 22:48:41 2010
@@ -123,8 +123,6 @@ gpProtectedMain (struct haCmdlineOptions
   char *mainClass = NULL;
   char *mainClassAlloc = NULL;
   int isStandaloneJar = 0;
-  int copyrightWritten = 0;
-  int versionWritten = 0;
   UDATA classArg = argc;
   int i;
   char *vmdllsubdir;
@@ -135,7 +133,6 @@ gpProtectedMain (struct haCmdlineOptions
   char *exeBaseName;
   char *endPathPtr;
   UDATA handle;
-  int javaRc = 0;
   char defaultDllName[] = "harmonyvm";
   char defaultDirName[] = "default";
   int rc = -1;
@@ -1185,7 +1182,6 @@ main_runJavaMain (JNIEnv * env, char *ma
   jclass globalCls;
   jarray globalArgs;
 
-  PORT_ACCESS_FROM_PORT (portLibrary);
   slashifiedClassName =
     portLibrary->mem_allocate_memory (portLibrary,
                                       strlen (mainClassName) + 1);
@@ -1542,7 +1538,6 @@ main_addVMDirToPath(int argc, char **arg
 {
   char *vmdllsubdir;
   char *newPathToAdd = NULL;
-  char *propertiesFileName = NULL;
   char *exeName = NULL;
   char *exeBaseName;
   char *endPathPtr;

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/unix/main_hlp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/unix/main_hlp.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/unix/main_hlp.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/launcher/unix/main_hlp.c Thu Mar 18 22:48:41 2010
@@ -56,10 +56,12 @@
 #include "main_hlp.h"
 
 
+#if !defined(LINUX)
 static BOOLEAN isSymbolicLink (char *filename);
 static IDATA cwdname (char **result);
-static IDATA readSymbolicLink (char *linkFilename, char **result);
 static IDATA searchSystemPath (char *filename, char **result);
+#endif
+static IDATA readSymbolicLink (char *linkFilename, char **result);
 
 
 int
@@ -194,7 +196,6 @@ void *
 main_mem_allocate_memory (int byteAmount)
 {
 	void *pointer = NULL;
-	void *mem;
 	if (byteAmount == 0)
 	{                           /* prevent malloc from failing causing allocate to return null */
 		byteAmount = 1;
@@ -210,6 +211,7 @@ main_mem_free_memory (void *memoryPointe
 }
 
 
+#if !defined(LINUX)
 /**
  * @internal  Examines the named file to determine if it is a symbolic link.  On platforms which don't have
  * symbolic links (or where we can't tell) or if an unexpected error occurs, just answer FALSE.
@@ -262,7 +264,7 @@ doAlloc:
   *result = cwd;
   return 0;
 }
-
+#endif
 
 /**
  * @internal  Attempts to read the contents of a symbolic link.  (The contents are the relative pathname of
@@ -275,8 +277,6 @@ static IDATA
 readSymbolicLink (char *linkFilename,
                   char **result)
 {
-  /* TODO: remove this ifdef and find out what other builds break (if any) */
-#if defined(LINUX)
   char fixedBuffer[PATH_MAX + 1];
   int size = readlink (linkFilename, fixedBuffer, sizeof (fixedBuffer) - 1);
   if (size <= 0)
@@ -291,12 +291,10 @@ readSymbolicLink (char *linkFilename,
     }
   strcpy (*result, fixedBuffer);
   return 0;
-#else
-  return -1;
-#endif
 }
 
 
+#if !defined(LINUX)
 /**
  * @internal  Searches through the system PATH for the named file.  If found, it returns the path entry
  * which matched the file.  A buffer large enough to hold the proper path entry (without a
@@ -368,6 +366,7 @@ searchSystemPath (char *filename, char *
   /* not found */
   return -1;
 }
+#endif
 
 /**
  * Close a shared library.

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c Thu Mar 18 22:48:41 2010
@@ -136,7 +136,7 @@ JNIEXPORT jboolean JNICALL Java_org_apac
 JNIEXPORT jint JNICALL Java_org_apache_harmony_luni_platform_OSMemory_flushImpl
   (JNIEnv * env, jobject thiz, jlong addr, jlong size){
   return msync((void *)((IDATA)addr), size, MS_SYNC);
-};
+}
 
 /*
  * Class:     org_apache_harmony_luni_platform_OSMemory

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSNetworkSystemLinux.c Thu Mar 18 22:48:41 2010
@@ -372,7 +372,7 @@ Java_org_apache_harmony_luni_platform_OS
   
   /* return both correct and error result, let java code handle	exceptions */
   return result;
-};
+}
 
 
 JNIEXPORT jobject JNICALL

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/vmls/shared/vmls.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/vmls/shared/vmls.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/vmls/shared/vmls.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/vmls/shared/vmls.c Thu Mar 18 22:48:41 2010
@@ -136,7 +136,6 @@ UDATA JNICALL HyVMLSAllocKeys(JNIEnv * e
 	hythread_monitor_enter(globalMonitor);
 
 	if (++(*pInitCount) == 1) {
-		JavaVM *javaVM = NULL;
 		void **pKey;
 		UDATA count = 0;
 

Modified: harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ArrayAccessorImpl.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ArrayAccessorImpl.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ArrayAccessorImpl.c (original)
+++ harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ArrayAccessorImpl.c Thu Mar 18 22:48:41 2010
@@ -111,14 +111,14 @@ pinFunctions(Double, jdouble)
     (*env)->ReleasePrimitiveArrayCritical(env, (jarray)array, ptr, 0); \
 }
 
-setGetFunctions(B, jbyte);
-setGetFunctions(Z, jboolean);
-setGetFunctions(S, jshort);
-setGetFunctions(C, jchar);
-setGetFunctions(I, jint);
-setGetFunctions(J, jlong);
-setGetFunctions(F, jfloat);
-setGetFunctions(D, jdouble);
+setGetFunctions(B, jbyte)
+setGetFunctions(Z, jboolean)
+setGetFunctions(S, jshort)
+setGetFunctions(C, jchar)
+setGetFunctions(I, jint)
+setGetFunctions(J, jlong)
+setGetFunctions(F, jfloat)
+setGetFunctions(D, jdouble)
 
 /*
  * Class:     org_apache_harmony_misc_accessors_ArrayAccessor

Modified: harmony/enhanced/classlib/trunk/modules/nio/src/main/native/nio/unix/EpollSelectorImpl.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/nio/src/main/native/nio/unix/EpollSelectorImpl.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/nio/src/main/native/nio/unix/EpollSelectorImpl.c (original)
+++ harmony/enhanced/classlib/trunk/modules/nio/src/main/native/nio/unix/EpollSelectorImpl.c Thu Mar 18 22:48:41 2010
@@ -118,7 +118,6 @@ JNIEXPORT jlong JNICALL Java_org_apache_
 JNIEXPORT jlong JNICALL Java_org_apache_harmony_nio_internal_EpollSelectorImpl_addFileDescriptor
   (JNIEnv * env, jclass clazz, jlong epollfd, jint mode, jint fd) 
 {
-    int op;
     struct epoll_event ev;
     int result;
     

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/iohelp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/iohelp.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/iohelp.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/common/shared/iohelp.c Thu Mar 18 22:48:41 2010
@@ -27,7 +27,9 @@ void
 ioh_convertToPlatform (char *path)
 {
   char *pathIndex;
+#if !(DIR_SEPARATOR == '/')
   size_t length = strlen (path);
+#endif
 
   /* Convert all separators to the same type */
   pathIndex = path;

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hynls.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hynls.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hynls.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/shared/hynls.c Thu Mar 18 22:48:41 2010
@@ -595,7 +595,6 @@ parse_catalogues (struct HyPortLibrary *
   I_32 success_reading = 0;
   HyNLSDataCache *nls = &portLibrary->portGlobals->nls_data;
   HyNLSHashEntry *entry = NULL;
-  char *message = NULL;
   char convertedModuleEnum[5];
   U_32 catalog_index;
   /* calculate a size which is larger than we could possibly need by putting together all of the prefixes and suffixes */
@@ -988,7 +987,6 @@ static void
 free_catalog (struct HyPortLibrary *portLibrary)
 {
   HyNLSDataCache *nls = &portLibrary->portGlobals->nls_data;
-  HyNLSHashEntry *old_hashEntries = nls->old_hashEntries;
   U_32 i;
 #if defined(NLS_DEBUG_TRACE)
   portLibrary->tty_printf (portLibrary, "NLS - free_catalog\n");

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyipcmutex.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyipcmutex.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyipcmutex.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyipcmutex.c Thu Mar 18 22:48:41 2010
@@ -183,7 +183,6 @@ hyipcmutex_release (struct HyPortLibrary
 {
   int sid;
   int nsops;                    /* number of operations to perform on semaphore */
-  int nsems = 1;                /* number of semaphores */
   key_t sKey = 439;             /* semaphore identifier key */
   int nameLen;                  /* length of semaphore name */
   char *sPath;                  /* semaphore path (used in ftok) */

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hymem.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hymem.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hymem.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hymem.c Thu Mar 18 22:48:41 2010
@@ -58,7 +58,9 @@ void *VMCALL
 hymem_allocate_memory (struct HyPortLibrary *portLibrary, UDATA byteAmount)
 {
   void *pointer = NULL;
+#if defined(DEBUG_MALLOC_FREE_LEAK)
   void *mem;
+#endif
 
   Trc_PRT_mem_hymem_allocate_memory_Entry (byteAmount);
 #if defined(DEBUG_MALLOC_FREE_LEAK)

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hynlshelpers.c Thu Mar 18 22:48:41 2010
@@ -73,8 +73,6 @@ nls_determine_locale (struct HyPortLibra
 
   IDATA countryStart = 2;
 
-  PORT_ACCESS_FROM_PORT (portLibrary);
-
   /* Get the language */
 
   /* Set locale, returns NULL in case locale data cannot be initialized. This may indicate

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyshmem.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyshmem.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyshmem.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyshmem.c Thu Mar 18 22:48:41 2010
@@ -87,8 +87,6 @@ static struct hyshmem_handle *createshmH
 static IDATA writeControlFile (HyPortLibrary * portLibrary,
                                const char *filename, I_32 proj_id, key_t key,
                                I_32 size, I_32 shmid);
-static void getControlFileName (struct HyPortLibrary *portLibrary,
-                                char *buffer, UDATA size, const char *name);
 static IDATA openSharedMemory (HyPortLibrary * portLibrary,
                                struct hyshmem_handle **handle,
                                const char *controlFile);
@@ -125,9 +123,6 @@ hyshmem_open (HyPortLibrary * portLibrar
 {
   /*TODO: Do we need the length to be longer? */
   char controlFile[HYSH_MAXPATH];
-  IDATA retryCount, exist;
-  key_t fkey;
-  void *region;
   int retry = RETRY_COUNT;
 
   Trc_PRT_shmem_hyshmem_open_Entry (rootname, size, perm);
@@ -417,7 +412,6 @@ hyshmem_findnext (struct HyPortLibrary *
                   char *resultbuf)
 {
   char file[HyMaxPath];
-  int result;
 
   Trc_PRT_shmem_hyshmem_findnext_Entry (findHandle);
 
@@ -558,7 +552,6 @@ openSharedMemory (HyPortLibrary * portLi
                   const char *controlFile)
 {
   struct hyshmem_controlFileFormat *info;
-  key_t fkey;
   void *region;
   UDATA retryCount = RETRY_COUNT;
   IDATA rc;
@@ -957,36 +950,6 @@ readControlFile (HyPortLibrary * portLib
 
 #undef CDEV_CURRENT_FUNCTION
 
-#define CDEV_CURRENT_FUNCTION getControlFileName
-/**
- * @internal
- * Get the filename for a shared memory area
- *
- * @param[in] portLibrary The port library
- * @param[in] buffer where the base file name will be stored
- * @param[in] size size of the buffer
- * @param[in] name of the shared memory area
- *
- */
-static void
-getControlFileName (struct HyPortLibrary *portLibrary, char *buffer,
-                    UDATA size, const char *name)
-{
-  char versionStr[256];
-
-  GET_VERSION_STRING (portLibrary, versionStr);
-  portLibrary->str_printf (portLibrary, buffer, size, "%s%s%s", versionStr,
-                           HYSH_MEMORY_ID, name);
-
-#if defined(HYSHMEM_DEBUG)
-  portLibrary->tty_printf (portLibrary, "getControlFileName returns: %s\n",
-                           buffer);
-#endif
-
-}
-
-#undef CDEV_CURRENT_FUNCTION
-
 #define CDEV_CURRENT_FUNCTION isControlFileName
 static int
 isControlFileName (struct HyPortLibrary *portLibrary, char *buffer)
@@ -1049,7 +1012,7 @@ getControlFilePath (struct HyPortLibrary
                            HYSH_BASEDIR, versionStr, HYSH_MEMORY_ID, name);
 
 #if defined(HYSHMEM_DEBUG)
-  portLibrary->tty_printf (portLibrary, "getControlFileName returns: %s\n",
+  portLibrary->tty_printf (portLibrary, "getControlFilePath returns: %s\n",
                            buffer);
 #endif
 

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyshsem.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyshsem.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyshsem.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyshsem.c Thu Mar 18 22:48:41 2010
@@ -104,10 +104,7 @@ hyshsem_open (struct HyPortLibrary *port
   /* TODO: needs to be longer? dynamic? */
   char baseFile[HYSH_MAXPATH];
   char versionStr[32];
-  struct stat statbuf;
   I_8 retry = RETRY_COUNT;
-  I_8 exist = 0;
-  I_32 fd;
 
   Trc_PRT_shsem_hyshsem_open_Entry (semname, setSize, permission);
 
@@ -880,7 +877,6 @@ openSemaphore (struct HyPortLibrary *por
   /* base file exist - process the file and get sem info */
   hyshsem_baseFileFormat *info;
   I_8 retrycount = RETRY_COUNT;
-  key_t fkey;
   I_32 rc;
 
   while (retrycount > 0)

Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysock.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysock.c?rev=925033&r1=925032&r2=925033&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysock.c (original)
+++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysock.c Thu Mar 18 22:48:41 2010
@@ -958,7 +958,9 @@ hysock_getaddrinfo_address (struct HyPor
   I_32 rc = 0;
   OSADDRINFO *addr;
   void *sock_addr;
+#if !defined(IPv6_FUNCTION_SUPPORT)
   char **addr_list;
+#endif
   int i;
 
   /* If we have the IPv6 functions available we cast to an OSADDRINFO structure otherwise a OSHOSTENET structure */
@@ -1169,7 +1171,9 @@ hysock_getaddrinfo_name (struct HyPortLi
                          hyaddrinfo_t handle, char *name, int index)
 {
   I_32 rc = 0;
+#if !defined(IPv6_FUNCTION_SUPPORT)
   char **alias_list;
+#endif
   int i;
   OSADDRINFO *addr;
 
@@ -1591,8 +1595,6 @@ hysock_getnameinfo (struct HyPortLibrary
 
 /* If we have the IPv6 functions available we will call them, otherwise we'll call the IPv4 function */
 #if defined(IPv6_FUNCTION_SUPPORT)
-  OSSOCKADDR *addr;
-  int size;
   int rc = 0;
   rc =
     getnameinfo ((OSADDR *) & in_addr->addr, sizeof (in_addr->addr), name,
@@ -4950,11 +4952,8 @@ getNextNetlinkMsg (struct HyPortLibrary 
 {
 
 #if (defined(HAS_RTNETLINK))
-  struct sockaddr_nl address;
   U_32 receiveLength;
   struct pollfd my_pollfd;
-  socklen_t addressLength = sizeof (address);
-  int result;
 
   for (;;)
     {
@@ -4999,7 +4998,7 @@ getNextNetlinkMsg (struct HyPortLibrary 
                 int reallocLoop = 1;
 
                 while (reallocLoop) {
-                    int len = recvmsg(netlinkContext->netlinkSocketHandle, &msg, MSG_PEEK);
+                    (void)recvmsg(netlinkContext->netlinkSocketHandle, &msg, MSG_PEEK);
 
                     /*
                      *  if the peek shows that we would truncate, realloc to 2x the buffer size