fixed warnings/errors from GCC