Fix compiler warning when printing uint64_t

This commit is contained in:
Alexandru Csete 2018-12-02 21:26:51 +01:00 committed by Manolis Surligas
parent 512260ac88
commit db08d31f53
1 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,8 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include "config.h" #include "config.h"
@ -86,7 +88,7 @@ namespace gr
send_freq (int sock, uint64_t freq) send_freq (int sock, uint64_t freq)
{ {
static char buf[512]; static char buf[512];
snprintf (buf, 512, "%llu\n", freq); snprintf (buf, 512, "%" PRIu64 "\n", freq);
send (sock, buf, strnlen (buf, 512), 0); send (sock, buf, strnlen (buf, 512), 0);
} }