Skip to content

Commit

Permalink
Fix compiler errors when DEBUG is defined
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Khrabrov <khrabrov@cs.toronto.edu>
  • Loading branch information
AlexeyKhrabrov committed Apr 19, 2021
1 parent 840473a commit 41c46b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions gc/base/standard/CompactScheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1272,8 +1272,7 @@ MM_CompactScheme::doCompact(MM_EnvironmentStandard *env, MM_MemorySubSpace *memo
setFreeChunkSize(deadObject, deadObjectSize);
#if defined(DEBUG)
if (deadObjectSize > 2*sizeof(uintptr_t)) {
uintptr_t junk = _extensions->objectModel.getSizeInBytesMultiSlotDeadObject(deadObject);
assume0(junk == deadObjectSize);
assume0(_extensions->objectModel.getSizeInBytesMultiSlotDeadObject(deadObject) == deadObjectSize);
}
#endif /* DEBUG */
}
Expand Down
4 changes: 2 additions & 2 deletions tools/hookgen/HookGen.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2015, 2019 IBM Corp. and others
* Copyright (c) 2015, 2021 IBM Corp. and others
*
* This program and the accompanying materials are made available under
* the terms of the Eclipse Public License 2.0 which accompanies this
Expand Down Expand Up @@ -398,7 +398,7 @@ HookGen::createFile(char *path, const char *fileName)

FILE *file = fopen(buff, "wb");
#if defined(DEBUG)
fprintf(stderr, "Opening %s for writing\n", temp);
fprintf(stderr, "Opening %s for writing\n", buff);
#endif /* DEBUG */

free(buff);
Expand Down

0 comments on commit 41c46b8

Please sign in to comment.