syncdaemon: Fix static analyzer and compiler warnings