sprintf second argument should be a format string. This produces warning (and with -Werror build fails). Simply adding %s would do.