From e367c05620583670ba02e9690e790ffd800c2f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Mon, 29 Apr 2013 21:35:40 +0200 Subject: [PATCH] SoundRecorder: fixed two warnings. * warnings about comparison between signed and unsigned integer expressions. * also use std::min() instead of min_c() --- src/apps/soundrecorder/FileUtils.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/apps/soundrecorder/FileUtils.cpp b/src/apps/soundrecorder/FileUtils.cpp index 6200866867..70e90082a4 100644 --- a/src/apps/soundrecorder/FileUtils.cpp +++ b/src/apps/soundrecorder/FileUtils.cpp @@ -9,6 +9,7 @@ ******************************************************************************/ #include "FileUtils.h" +#include #include #include #include @@ -95,7 +96,7 @@ CopyAttributes(BNode& dst, BNode& src) uint8 buffer[size]; off_t offset = 0; ssize_t read = src.ReadAttr(attrName, info.type, offset, buffer, - min_c(size, info.size)); + std::min((off_t)size, info.size)); if (read < 0) { fprintf(stderr, "Error reading attribute '%s'\n", attrName); return (status_t)read; @@ -113,7 +114,7 @@ CopyAttributes(BNode& dst, BNode& src) } offset += read; read = src.ReadAttr(attrName, info.type, offset, buffer, - min_c(size, info.size - offset)); + std::min((off_t)size, info.size - offset)); if (read < 0) { fprintf(stderr, "Error reading attribute '%s'\n", attrName); return (status_t)read;