From c24ec7f3ea72ee340b88428a6cba66005265a995 Mon Sep 17 00:00:00 2001 From: Joe deKoning Date: Tue, 17 Oct 2017 13:56:27 -0400 Subject: [PATCH] Fixes for compile errors seen on OSX Signed-off-by: Joe deKoning --- runtime/exelib/common/rconsole.c | 2 +- runtime/zip/zipcache.c | 6 ++++-- runtime/zip/zipsup.c | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/runtime/exelib/common/rconsole.c b/runtime/exelib/common/rconsole.c index b45d8f5a232..2669ca95c3a 100644 --- a/runtime/exelib/common/rconsole.c +++ b/runtime/exelib/common/rconsole.c @@ -60,7 +60,7 @@ remoteConsole_parseCmdLine(J9PortLibrary *portLibrary, UDATA lastLegalArg, char port = NULL; filepath = NULL; for (i = 1; i <= lastLegalArg; i++) { - if ((argv[i][0] == '-')) { + if (argv[i][0] == '-') { if ((strncmp(&argv[i][1], "IO", 2) == 0) || (strncmp(&argv[i][1], "io", 2) == 0)) { diff --git a/runtime/zip/zipcache.c b/runtime/zip/zipcache.c index e4e53d0c167..6cde5899169 100644 --- a/runtime/zip/zipcache.c +++ b/runtime/zip/zipcache.c @@ -338,7 +338,8 @@ BOOLEAN zipCache_copy(J9ZipCache * zipCache, void *cacheData, UDATA dataSize) { orgDirEntry = &orgzce->root; /* copy the root file list */ - if (record = ZIP_SRP_GET(orgDirEntry->fileList, J9ZipFileRecord *)) { + record = ZIP_SRP_GET(orgDirEntry->fileList, J9ZipFileRecord *); + if (NULL != record) { while (record) { J9ZipFileEntry *fileEntry = record->entry; for (i=0; ientryCount; i++) { @@ -830,7 +831,8 @@ J9ZipFileEntry *zipCache_addToFileList(J9PortLibrary *portLib, J9ZipCacheEntry * char *name; if (chunkActiveDir == dirEntry) { - if (entry = (J9ZipFileEntry *) zipCache_reserveEntry(zce, chunk, sizeof(*entry), nameSize, &name)) { + entry = (J9ZipFileEntry *) zipCache_reserveEntry(zce, chunk, sizeof(*entry), nameSize, &name); + if (NULL != entry) { J9ZipFileRecord *fileList = ZIP_SRP_GET(chunkActiveDir->fileList, J9ZipFileRecord *); /* add to end of existing entry */ fileList->entryCount++; diff --git a/runtime/zip/zipsup.c b/runtime/zip/zipsup.c index 2b011e3ae6d..e8f24d784d0 100644 --- a/runtime/zip/zipsup.c +++ b/runtime/zip/zipsup.c @@ -1009,7 +1009,7 @@ readZipEntry(J9PortLibrary * portLib, J9ZipFile * zipFile, J9ZipEntry * zipEntry ZIP_NEXT_U32(sig, current); if (enumerationPointer) { - if ((sig == ZIP_CentralEnd)) { + if (sig == ZIP_CentralEnd) { result = ZIP_ERR_NO_MORE_ENTRIES; goto finished; }