Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 15322 invoked from network); 16 Jul 2009 03:39:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Jul 2009 03:39:14 -0000 Received: (qmail 94843 invoked by uid 500); 16 Jul 2009 03:40:19 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 94781 invoked by uid 500); 16 Jul 2009 03:40:19 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 94767 invoked by uid 99); 16 Jul 2009 03:40:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2009 03:40:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Jul 2009 03:40:15 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 3B4E2238893B; Thu, 16 Jul 2009 03:39:54 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r794510 - in /harmony/enhanced/classlib/trunk/modules: auth/src/main/native/auth/unix/ luni/src/main/native/luni/unix/ portlib/src/main/native/port/unix/ Date: Thu, 16 Jul 2009 03:39:53 -0000 To: commits@harmony.apache.org From: ndbeyer@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090716033954.3B4E2238893B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ndbeyer Date: Thu Jul 16 03:39:53 2009 New Revision: 794510 URL: http://svn.apache.org/viewvc?rev=794510&view=rev Log: Apply patch for HARMONY-6266 - Building in release mode fails with gcc version 4.3.3 Modified: harmony/enhanced/classlib/trunk/modules/auth/src/main/native/auth/unix/authnix.c harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyfiletext.c harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyosdump.c harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysl.c Modified: harmony/enhanced/classlib/trunk/modules/auth/src/main/native/auth/unix/authnix.c URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/auth/src/main/native/auth/unix/authnix.c?rev=794510&r1=794509&r2=794510&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/auth/src/main/native/auth/unix/authnix.c (original) +++ harmony/enhanced/classlib/trunk/modules/auth/src/main/native/auth/unix/authnix.c Thu Jul 16 03:39:53 2009 @@ -131,6 +131,7 @@ (*jenv)->SetObjectField (jenv, thiz, jf_groupname, (*jenv)->NewStringUTF (jenv, pg->gr_name)); gcount = getgroups(0, NULL); + if( 0 != gcount ) { gid_t * gids; @@ -138,10 +139,13 @@ jlong * jgs_raw; jobjectArray jgsnames; int i; + int gcount_temp; gids = (gid_t*)hymem_allocate_memory(gcount*sizeof(gid_t)); - getgroups(gcount, gids); + /* capture return code to fix compiler warning */ + gcount_temp = getgroups(gcount, gids); + jgs = (*jenv)->NewLongArray (jenv, gcount); jgs_raw = (*jenv)->GetLongArrayElements (jenv, jgs, NULL); jgsnames = (*jenv)->NewObjectArray (jenv, gcount, jclassString, NULL); Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c?rev=794510&r1=794509&r2=794510&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c (original) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/procimpl.c Thu Jul 16 03:39:53 2009 @@ -129,6 +129,7 @@ int execvFailure[2] = {0,0}; int forkedChildIsRunning[2] = {0,0}; int error = 0; + int writeRC = 0; /* Build the new io pipes (in/out/err) */ if (pipe(newFD[0]) == -1) goto error; @@ -173,11 +174,14 @@ dup2(newFD[2][1], 2); /* tells the parent that that very process is running */ - write(forkedChildIsRunning[1], &dummy, 1); + if (-1 == write(forkedChildIsRunning[1], &dummy, 1)) { + goto error; + } if (dir) { if (chdir(dir) == -1) { - write(execvFailure[1], &errno, sizeof(errno)); + /* capture return code to fix compiler warning */ + writeRC = write(execvFailure[1], &errno, sizeof(errno)); exit(-1); } } @@ -192,7 +196,8 @@ /* ===================================================== */ /* if we get here ==> tell the parent that the execv failed ! */ - write(execvFailure[1], &errno, sizeof(errno)); + /* capture return code to fix compiler warning */ + writeRC = write(execvFailure[1], &errno, sizeof(errno)); /* If the exec failed, we must exit or there will be two VM processes running. */ exit(rc); } else { @@ -212,7 +217,9 @@ *(procHandle) = (IDATA) grdpid; /* let the forked child start. */ - read(forkedChildIsRunning[0], &dummy, 1); + if (-1 == read(forkedChildIsRunning[0], &dummy, 1)) { + goto error; + } close(forkedChildIsRunning[0]); close(forkedChildIsRunning[1]); Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyfiletext.c URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyfiletext.c?rev=794510&r1=794509&r2=794510&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyfiletext.c (original) +++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyfiletext.c Thu Jul 16 03:39:53 2009 @@ -230,14 +230,14 @@ const U_8 *cursor = buf; IDATA newLength = 0; int hasHighChars = 0; + int wcresult; /* reset the shift state */ - wctomb (NULL, 0); + wcresult = wctomb (NULL, 0); while (cursor < end) { if ((*cursor & 0x80) == 0x80) { char temp[MB_CUR_MAX]; - int wcresult; U_16 unicode; U_32 numberU8Consumed = decodeUTF8CharN (cursor, &unicode, end - cursor); Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyosdump.c URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyosdump.c?rev=794510&r1=794509&r2=794510&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyosdump.c (original) +++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hyosdump.c Thu Jul 16 03:39:53 2009 @@ -83,7 +83,10 @@ if (lastSep != NULL) { lastSep[1] = '\0'; - chdir (filename); + if (0 != chdir (filename)) + { + return -1; + } } /* Ensure we get default action (core) - reset primary&app handlers */ Modified: harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysl.c URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysl.c?rev=794510&r1=794509&r2=794510&view=diff ============================================================================== --- harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysl.c (original) +++ harmony/enhanced/classlib/trunk/modules/portlib/src/main/native/port/unix/hysl.c Thu Jul 16 03:39:53 2009 @@ -303,7 +303,7 @@ end = &errBuf[bufLen - 1]; walk = error; /* reset the shift state */ - mbtowc (NULL, NULL, 0); + ret = mbtowc (NULL, NULL, 0); while (*walk) { ret = mbtowc (&ch, walk, MB_CUR_MAX);