src: code cleanup
 * basic style fix.
 * some compiler warning fixed.