Another small signed / unsigned warning fix

This is in the Mac support file that wasn't compiled on Linux when I tried to
finish the cleanup.

Now this compiles without warnings on Mac and iOS as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2016-03-23 17:25:11 -07:00
parent 788d65a527
commit 509b664a29

View file

@ -119,7 +119,7 @@ int enumerate_devices(device_callback_t callback, void *userdata, int dc_type)
if (fnmatch(patterns[i], ep->d_name, 0) == 0) {
char filename[1024];
int n = snprintf(filename, sizeof(filename), "%s/%s", dirname, ep->d_name);
if (n >= sizeof(filename)) {
if (n >= (int)sizeof(filename)) {
closedir(dp);
return -1;
}
@ -145,7 +145,7 @@ int enumerate_devices(device_callback_t callback, void *userdata, int dc_type)
if (fnmatch("UEMISSDA", ep->d_name, 0) == 0) {
char filename[1024];
int n = snprintf(filename, sizeof(filename), "%s/%s", dirname, ep->d_name);
if (n >= sizeof(filename)) {
if (n >= (int)sizeof(filename)) {
closedir(dp);
return -1;
}