#2413 tclIO.c: compiler warning

obsolete: 8.4.3
closed-wont-fix
3
2004-07-16
2003-07-15
Don Porter
No

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),
^

Discussion

  • Andreas Kupries

    Andreas Kupries - 2003-08-08
    • priority: 5 --> 8
     
  • Andreas Kupries

    Andreas Kupries - 2003-10-21

    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 Kupries

    Andreas Kupries - 2003-10-21
    • priority: 8 --> 3
     
  • Andreas Kupries

    Andreas Kupries - 2004-07-16

    Logged In: YES
    user_id=75003

    Any ideas ? Otherwise the 'Won't fix' will go into effect.

     
  • Andreas Kupries

    Andreas Kupries - 2004-07-16
    • status: open --> closed-wont-fix