Skip to content

Use standard size_t type in the casts for length-parameter of memcpy, memmove

Thomas E. Dickey requested to merge dickey/libxt:fix-miscast-lengths into master

and bzero. When the library was written (1989), none of those had been standardized, and the source-code used "(int)" casts to help with K&R compilers. The cleanup done in the previous update used binary-compare to validate, which does not work for these because the compiler is recording the cast's effect.

This change reduces the number of gcc warnings from 163 to 128.

Signed-off-by: Thomas E. Dickey dickey@invisible-island.net

Merge request reports