Add printf attribute to log_err/DPRINTF and fix a few warnings

Modified to not use %z for portability reasons.
This commit is contained in:
Catalin Patulea
2014-03-14 00:36:30 -04:00
committed by Justin Maggard
parent 45cf9208fb
commit 3a57744735
11 changed files with 30 additions and 22 deletions

View File

@ -244,7 +244,8 @@ ParseHttpHeaders(struct upnphttp * h)
h->req_RangeStart = strtoll(p+6, &colon, 10);
h->req_RangeEnd = colon ? atoll(colon+1) : 0;
DPRINTF(E_DEBUG, L_HTTP, "Range Start-End: %lld - %lld\n",
h->req_RangeStart, h->req_RangeEnd?h->req_RangeEnd:-1);
(long long)h->req_RangeStart,
h->req_RangeEnd ? (long long)h->req_RangeEnd : -1);
}
}
else if(strncasecmp(line, "Host", 4)==0)
@ -1048,7 +1049,7 @@ Process_upnphttp(struct upnphttp * h)
}
else
{
size_t new_req_buflen;
int new_req_buflen;
const char * endheaders;
/* if 1st arg of realloc() is null,
* realloc behaves the same as malloc() */
@ -1823,7 +1824,7 @@ SendResp_dlnafile(struct upnphttp *h, char *object)
ret = sql_get_table(db, buf, &result, &rows, NULL);
if( (ret != SQLITE_OK) )
{
DPRINTF(E_ERROR, L_HTTP, "Didn't find valid file for %lld!\n", id);
DPRINTF(E_ERROR, L_HTTP, "Didn't find valid file for %lld!\n", (long long)id);
Send500(h);
return;
}
@ -1876,7 +1877,7 @@ SendResp_dlnafile(struct upnphttp *h, char *object)
}
#endif
DPRINTF(E_INFO, L_HTTP, "Serving DetailID: %lld [%s]\n", id, last_file.path);
DPRINTF(E_INFO, L_HTTP, "Serving DetailID: %lld [%s]\n", (long long)id, last_file.path);
if( h->reqflags & FLAG_XFERSTREAMING )
{