* Warning fix for loader component
@ 2001-06-21 22:32 Ben Elliston
2001-06-22 4:54 ` matthew green
0 siblings, 1 reply; 4+ messages in thread
From: Ben Elliston @ 2001-06-21 22:32 UTC (permalink / raw)
To: matthew green; +Cc: sid
Matt,
I noticed a warning coming from g++ when building the loader component
library and, after doing some research, have concluded that the
obvious change is the right one.
Why was dest_addr cast to void *? It seems to me this way leads to
lossage! (On my system, the sizeof (void *) is 4).
Okay to commit?
Ben
Index: compLoader.cxx
===================================================================
RCS file: /cvs/cvsfiles/devo/sid/component/loader/compLoader.cxx,v
retrieving revision 1.37
diff -u -r1.37 compLoader.cxx
--- compLoader.cxx 2001/04/03 19:34:34 1.37
+++ compLoader.cxx 2001/06/22 05:27:14
@@ -239,7 +239,7 @@
<< " bytes from file offset "
<< make_numeric_attribute (file_offset, ios::hex | ios::showbase)
<< " into target " << who << " memory at "
- << make_numeric_attribute ((void *)dest_addr, ios::hex | ios::showbase)
+ << make_numeric_attribute (dest_addr, ios::hex | ios::showbase)
<< endl;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* re: Warning fix for loader component
2001-06-21 22:32 Warning fix for loader component Ben Elliston
@ 2001-06-22 4:54 ` matthew green
2001-06-22 15:19 ` Ben Elliston
0 siblings, 1 reply; 4+ messages in thread
From: matthew green @ 2001-06-22 4:54 UTC (permalink / raw)
To: Ben Elliston; +Cc: sid
Why was dest_addr cast to void *? It seems to me this way leads to
lossage! (On my system, the sizeof (void *) is 4).
unfortunately, i don't recall why i made this change. it might be
documented in a list somewhere, but due to the terseness of our
ChangeLog entries, i don't know the _why_ anymore. certainly, with
sid as it currently is, dest_addr can never be >32 bits, so it would
not have failed (yet.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* re: Warning fix for loader component
2001-06-22 4:54 ` matthew green
@ 2001-06-22 15:19 ` Ben Elliston
2001-06-22 22:02 ` matthew green
0 siblings, 1 reply; 4+ messages in thread
From: Ben Elliston @ 2001-06-22 15:19 UTC (permalink / raw)
To: matthew green; +Cc: sid
>>>>> "matthew" == matthew green <mrg@cygnus.com> writes:
matthew> Why was dest_addr cast to void *? It seems to me this way leads to
matthew> lossage! (On my system, the sizeof (void *) is 4).
matthew> unfortunately, i don't recall why i made this change. it might be
matthew> documented in a list somewhere, but due to the terseness of our
matthew> ChangeLog entries, i don't know the _why_ anymore. certainly, with
matthew> sid as it currently is, dest_addr can never be >32 bits, so it would
matthew> not have failed (yet.)
Please check again -- the function prototype declares dest_addr as
host_int_8.
Ben
^ permalink raw reply [flat|nested] 4+ messages in thread
* re: Warning fix for loader component
2001-06-22 15:19 ` Ben Elliston
@ 2001-06-22 22:02 ` matthew green
0 siblings, 0 replies; 4+ messages in thread
From: matthew green @ 2001-06-22 22:02 UTC (permalink / raw)
To: Ben Elliston; +Cc: sid
matthew> Why was dest_addr cast to void *? It seems to me this way leads to
matthew> lossage! (On my system, the sizeof (void *) is 4).
matthew> unfortunately, i don't recall why i made this change. it might be
matthew> documented in a list somewhere, but due to the terseness of our
matthew> ChangeLog entries, i don't know the _why_ anymore. certainly, with
matthew> sid as it currently is, dest_addr can never be >32 bits, so it would
matthew> not have failed (yet.)
Please check again -- the function prototype declares dest_addr as
host_int_8.
sid doesn't currently support addresses > 32 bits, regardless of what
this code does.
.mrg.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-06-22 22:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-21 22:32 Warning fix for loader component Ben Elliston
2001-06-22 4:54 ` matthew green
2001-06-22 15:19 ` Ben Elliston
2001-06-22 22:02 ` matthew green
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).