Fix potential issues uncovered by GCC warnings.
commitbc5988d5c10543131337a03f60a8716b6c765289
authorLudovic Courtès <ludo@gnu.org>
Sun, 19 Apr 2009 21:56:02 +0000 (19 23:56 +0200)
committerLudovic Courtès <ludo@gnu.org>
Sun, 19 Apr 2009 21:56:02 +0000 (19 23:56 +0200)
tree4503d9a7cd372aca56079b16cd962a96c5d6a5e6
parent8ecf5bd3751ab749c9c78749cecd4599091df3bd
Fix potential issues uncovered by GCC warnings.

* src/bytevector.c (print_bytevector): Do something with PSTATE so that
  GCC is happier.
  (scm_r6rs_native_endianness, scm_r6rs_bytevector_p): Remove
  `FUNC_NAME', as suggested by GCC `-Wunused-macros'.
  (scm_r6rs_u8_list_to_bytevector, INTEGER_LIST_TO_BYTEVECTOR): Make
  C_LEN and I `long' since that's what `SCM_VALIDATE_LIST_COPYLEN ()'
  operates on.

* src/ports.c (cbip_fill_input): Consider `c_port->read_buf_size' as
  unsigned.
  (bop_seek)[SEEK_SET]: Check for OFFSET < 0.
  [SEEK_END]: Likewise.  Use `buf->len - (offset + 1)', which fixes
  `SEEK_END'.
  (cbop_write): Check for C_RESULT < 0.
src/bytevector.c
src/ports.c