Index: modules/auth/src/main/native/auth/unix/authnix.c =================================================================== --- modules/auth/src/main/native/auth/unix/authnix.c (revision 791779) +++ modules/auth/src/main/native/auth/unix/authnix.c (working copy) @@ -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); Index: modules/luni/src/main/native/luni/unix/procimpl.c =================================================================== --- modules/luni/src/main/native/luni/unix/procimpl.c (revision 792570) +++ modules/luni/src/main/native/luni/unix/procimpl.c (working copy) @@ -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]); Index: modules/portlib/src/main/native/port/unix/hyfiletext.c =================================================================== --- modules/portlib/src/main/native/port/unix/hyfiletext.c (revision 792179) +++ modules/portlib/src/main/native/port/unix/hyfiletext.c (working copy) @@ -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); Index: modules/portlib/src/main/native/port/unix/hyosdump.c =================================================================== --- modules/portlib/src/main/native/port/unix/hyosdump.c (revision 792558) +++ modules/portlib/src/main/native/port/unix/hyosdump.c (working copy) @@ -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 */ Index: modules/portlib/src/main/native/port/unix/hysl.c =================================================================== --- modules/portlib/src/main/native/port/unix/hysl.c (revision 791779) +++ modules/portlib/src/main/native/port/unix/hysl.c (working copy) @@ -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);