tclIO.c: compiler warning
Closed / Wont Fix771942ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 22 years ago
Descriptionplain2003-07-15 22:58:55
SGI compiler warns:
"./../generic/tclIO.c", line 3954: warning(1172):
subscript out of range
memcpy((VOID *) (nextPtr->buf +
BUFFER_PADDING - extra),
^
"./../generic/tclIO.c", line 4102: warning(1172):
subscript out of range
(VOID *) (nextPtr->buf +
BUFFER_PADDING - extra),
^
andreas_kupries Ticket [771942ffff]: 1 change
[History diff]2003-08-09 01:48:06
andreas_kupriesplain2003-10-22 06:55:58
Logged In: YES user_id=75003 This cannot be fixed I believe. The buf in the ChannelBuffer structure is declared as 4 chars long, and we allocate enough to hold the buffer. The compiler obviously finds a constant subscript which is greater 4 and thus warns about it. We know that the reference is in the allocated range, which is greater than the declared range. I have no idea how to rewrite the code to either fake out the compiler, or to tell the compiler to ignore problems of this type.
andreas_kupriesplain2004-07-17 02:22:26
Logged In: YES user_id=75003 Any ideas ? Otherwise the 'Won't fix' will go into effect.
Log in (anonymous is fine) to add a comment.