int len;
char error[CURL_ERROR_SIZE + 2];
va_start(ap, fmt);
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
len = mvsnprintf(error, CURL_ERROR_SIZE, fmt, ap);
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
if(data->set.errorbuffer && !data->state.errorbuf) {
strcpy(data->set.errorbuffer, error);
int len;
char buffer[MAXINFO + 2];
va_start(ap, fmt);
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
len = mvsnprintf(buffer, MAXINFO, fmt, ap);
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
va_end(ap);
buffer[len++] = '\n';
buffer[len] = '\0';
char buffer[MAXINFO + 2];
len = msnprintf(buffer, MAXINFO, "[%s] ", cf->cft->name);
va_start(ap, fmt);
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
len += mvsnprintf(buffer + len, MAXINFO - len, fmt, ap);
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
va_end(ap);
buffer[len++] = '\n';
buffer[len] = '\0';
char *sptr;
va_list ap;
va_start(ap, fmt);
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
s = vaprintf(fmt, ap); /* returns an allocated string */
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
va_end(ap);
if(!s)
return CURLE_OUT_OF_MEMORY; /* failure */
return CURLE_OUT_OF_MEMORY;
#else
char *str;
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
str = vaprintf(fmt, ap); /* this allocs a new string to append */
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
if(str) {
CURLcode result = dyn_nappend(s, (unsigned char *)str, strlen(str));
return;
va_start(ap, format);
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
nchars = mvsnprintf(buf, LOGLINE_BUFSIZE, format, ap);
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
va_end(ap);
if(nchars > LOGLINE_BUFSIZE - 1)
va_list ap;
va_start(ap, fmt);
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
s = curl_mvaprintf(fmt, ap);
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
va_end(ap);
if(s) {
char *bufp;
va_list ap;
va_start(ap, fmt);
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
bufp = curlx_mvaprintf(fmt, ap);
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
va_end(ap);
if(!bufp) {
ret = CURLE_OUT_OF_MEMORY;
char *ptr;
char *print_buffer;
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
print_buffer = curlx_mvaprintf(fmt, ap);
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
if(!print_buffer)
return;
len = strlen(print_buffer);
if(p && *p)
result = curlx_dyn_addn(&escaped, to + 2 * (p - from), 2);
else {
- const char *format = "\\x%02x";
-
- if(len > 1 && ISXDIGIT(s[1])) {
- /* Octal escape to avoid >2 digit hex. */
- format = "\\%03o";
- }
-
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
- result = curlx_dyn_addf(&escaped, format,
+ result = curlx_dyn_addf(&escaped,
+ /* Octal escape to avoid >2 digit hex. */
+ (len > 1 && ISXDIGIT(s[1])) ?
+ "\\%03o" : "\\x%02x",
(unsigned int) *(unsigned char *) s);
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
}
}
}
*/
static int huge(void)
{
- const char *url = "%s://%s:%s@%s/%s?%s#%s";
const char *smallpart = "c";
int i;
CURLU *urlp = curl_url();
for(i = 0; i < 7; i++) {
char *partp;
-#ifdef __clang__
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wformat-nonliteral"
-#endif
msnprintf(total, sizeof(total),
- url,
+ "%s://%s:%s@%s/%s?%s#%s",
(i == 0)? &bigpart[1] : smallpart,
(i == 1)? &bigpart[1] : smallpart,
(i == 2)? &bigpart[1] : smallpart,
(i == 4)? &bigpart[1] : smallpart,
(i == 5)? &bigpart[1] : smallpart,
(i == 6)? &bigpart[1] : smallpart);
-#ifdef __clang__
-#pragma clang diagnostic pop
-#endif
rc = curl_url_set(urlp, CURLUPART_URL, total, CURLU_NON_SUPPORT_SCHEME);
if((!i && (rc != CURLUE_BAD_SCHEME)) ||
(i && rc)) {