Skip to content

Commit fbf7448

Browse files
mborlanddaveedvdv-nvidia
authored andcommitted
Avoid outputing a raw address in an il_display warning since it could change from run to run. [GH edgcpp#340]
1 parent a8bb9ce commit fbf7448

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎src/il_display.c‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,12 @@ kind entry_kind.
168168
function-scope memory region kind. For string entries this can
169169
happen even when the string is allocated in file-scope memory,
170170
because strings referenced from a function-scope memory region
171-
are numbered as honorary members of that region during IL output. */
171+
are numbered as honorary members of that region during IL output.
172+
See assign_entry_number for details. */
172173
if (is_string_entry_kind(entry_kind)) {
173-
(void)fprintf(f_display, "**possible non-file-scope ptr** (%p)",
174-
(a_void_ptr)entry_ptr);
174+
/* This is usually benign, so omit the pointer value, which would
175+
only make the display vary from run to run. */
176+
(void)fprintf(f_display, "**possible non-file-scope ptr**");
175177
} else {
176178
(void)fprintf(f_display, "**NON FILE SCOPE PTR** (%p)",
177179
(a_void_ptr)entry_ptr);

0 commit comments

Comments
 (0)