Skip to content

Commit

Permalink
Merge pull request #7316 from ChungHsuanChen/fix-unused-var-error
Browse files Browse the repository at this point in the history
Fix build error caused by unused variable in OSX
  • Loading branch information
babsingh authored Apr 21, 2024
2 parents 723d2e4 + c299895 commit 40107cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions fvtest/porttest/omrtimeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ TEST(PortTimeTest, time_test3)
uint64_t hiresTimeStart, hiresTimeStop;
uint64_t hiresDeltaAsMillis, hiresDeltaAsMicros;
uint64_t ntimeDeltaAsMillis;
uint32_t i, j;
uint32_t i;
int32_t millires;

reportTestEntry(OMRPORTLIB, testName);
Expand All @@ -314,7 +314,7 @@ TEST(PortTimeTest, time_test3)
/*change of millis*/
time = omrtime_current_time_millis();
oldTime = time;
for (j = 0; oldTime == time; j++) {
while (oldTime == time) {
oldTime = omrtime_current_time_millis();
}
millires = (int32_t)(oldTime - time);
Expand Down
7 changes: 0 additions & 7 deletions fvtest/porttest/si.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ TEST(PortSysinfoTest, sysinfo_test_sysinfo_env_iterator)
J9SysinfoEnvElement element;
void *buffer = NULL;
uint32_t bufferSizeBytes = 0;
int l = 0;
#undef SI_DEBUG

reportTestEntry(OMRPORTLIB, testName);
Expand Down Expand Up @@ -546,13 +545,11 @@ TEST(PortSysinfoTest, sysinfo_test_sysinfo_env_iterator)

portTestEnv->log("Environment:\n\n");

l = 0;
while (omrsysinfo_env_iterator_hasNext(&state)) {
rc = omrsysinfo_env_iterator_next(&state, &element);

if (0 == rc) {
portTestEnv->log("%s\n", element.nameAndValue);
l++;
} else {
outputErrorMessage(PORTTEST_ERROR_ARGS, "\tomrsysinfo_env_iterator_next returned: %i when 0 was expected\n", rc);
goto done;
Expand Down Expand Up @@ -586,7 +583,6 @@ TEST(PortSysinfoTest, sysinfo_test_sysinfo_env_iterator)
#endif
}

l = 0;
while (omrsysinfo_env_iterator_hasNext(&state)) {

rc = omrsysinfo_env_iterator_next(&state, &element);
Expand All @@ -596,7 +592,6 @@ TEST(PortSysinfoTest, sysinfo_test_sysinfo_env_iterator)
#endif

if (0 == rc) {
l++;
} else {
outputErrorMessage(PORTTEST_ERROR_ARGS, "\tomrsysinfo_env_iterator_next returned: %i when 0 was expected\n", rc);
goto done;
Expand Down Expand Up @@ -629,7 +624,6 @@ TEST(PortSysinfoTest, sysinfo_test_sysinfo_env_iterator)
#endif
}

l = 0;
while (omrsysinfo_env_iterator_hasNext(&state)) {

rc = omrsysinfo_env_iterator_next(&state, &element);
Expand All @@ -639,7 +633,6 @@ TEST(PortSysinfoTest, sysinfo_test_sysinfo_env_iterator)
#endif

if (0 == rc) {
l++;
} else {
outputErrorMessage(PORTTEST_ERROR_ARGS, "\tomrsysinfo_env_iterator_next returned: %i when 0 was expected\n", rc);
goto done;
Expand Down

0 comments on commit 40107cb

Please sign in to comment.