char outwrk[16];
slen += (strlen(l_keepalives_idle) + 2);
- snprintf(outwrk, sizeof(outwrk), FORMAT_UINTEGER, self->connInfo.keepalive_idle);
+ snprintf(outwrk, sizeof(outwrk), FORMAT_INT4, self->connInfo.keepalive_idle);
slen += strlen(outwrk);
}
if (self->connInfo.keepalive_interval > 0)
char outwrk[16];
slen += (strlen(l_keepalives_interval) + 2);
- snprintf(outwrk, sizeof(outwrk), FORMAT_UINTEGER, self->connInfo.keepalive_interval);
+ snprintf(outwrk, sizeof(outwrk), FORMAT_INT4, self->connInfo.keepalive_interval);
slen += strlen(outwrk);
}
{
sprintf(ppacket, " %s=", l_keepalives_idle);
ppacket = strchr(ppacket, (int) '\0');
- sprintf(ppacket, FORMAT_UINTEGER, self->connInfo.keepalive_idle);
+ sprintf(ppacket, FORMAT_INT4, self->connInfo.keepalive_idle);
ppacket = strchr(ppacket, (int) '\0');
}
if (self->connInfo.keepalive_interval > 0)
{
sprintf(ppacket, " %s=", l_keepalives_interval);
ppacket = strchr(ppacket, (int) '\0');
- sprintf(ppacket, FORMAT_UINTEGER, self->connInfo.keepalive_interval);
+ sprintf(ppacket, FORMAT_INT4, self->connInfo.keepalive_interval);
ppacket = strchr(ppacket, (int) '\0');
}
*ppacket = '\0';
}
case SQL_C_INTERVAL_YEAR:
ivsign = ivstruct->interval_sign ? "-" : "";
- sprintf(param_string, "%s%d years", ivsign, ivstruct->intval.year_month.year);
+ sprintf(param_string, "%s%u years", ivsign, (unsigned int) ivstruct->intval.year_month.year);
break;
case SQL_C_INTERVAL_MONTH:
case SQL_C_INTERVAL_YEAR_TO_MONTH:
ivsign = ivstruct->interval_sign ? "-" : "";
- sprintf(param_string, "%s%d years %s%d mons", ivsign, ivstruct->intval.year_month.year, ivsign, ivstruct->intval.year_month.month);
+ sprintf(param_string, "%s%u years %s%u mons", ivsign, (unsigned int) ivstruct->intval.year_month.year, ivsign, (unsigned int) ivstruct->intval.year_month.month);
break;
case SQL_C_INTERVAL_DAY:
ivsign = ivstruct->interval_sign ? "-" : "";
- sprintf(param_string, "%s%d days", ivsign, ivstruct->intval.day_second.day);
+ sprintf(param_string, "%s%u days", ivsign, (unsigned int) ivstruct->intval.day_second.day);
break;
case SQL_C_INTERVAL_HOUR:
case SQL_C_INTERVAL_DAY_TO_HOUR:
ivsign = ivstruct->interval_sign ? "-" : "";
- sprintf(param_string, "%s%d days %s%02d:00:00", ivsign, ivstruct->intval.day_second.day, ivsign, ivstruct->intval.day_second.hour);
+ sprintf(param_string, "%s%u days %s%02u:00:00", ivsign, (unsigned int) ivstruct->intval.day_second.day, ivsign, (unsigned int) ivstruct->intval.day_second.hour);
break;
case SQL_C_INTERVAL_MINUTE:
case SQL_C_INTERVAL_HOUR_TO_MINUTE:
case SQL_C_INTERVAL_DAY_TO_MINUTE:
ivsign = ivstruct->interval_sign ? "-" : "";
- sprintf(param_string, "%s%d days %s%02d:%02d:00", ivsign, ivstruct->intval.day_second.day, ivsign, ivstruct->intval.day_second.hour, ivstruct->intval.day_second.minute);
+ sprintf(param_string, "%s%u days %s%02u:%02u:00", ivsign, (unsigned int) ivstruct->intval.day_second.day, ivsign, (unsigned int) ivstruct->intval.day_second.hour, (unsigned int) ivstruct->intval.day_second.minute);
break;
case SQL_C_INTERVAL_SECOND:
case SQL_C_INTERVAL_HOUR_TO_SECOND:
case SQL_C_INTERVAL_MINUTE_TO_SECOND:
ivsign = ivstruct->interval_sign ? "-" : "";
- sprintf(param_string, "%s%d days %s%02d:%02d:%02d",
- ivsign, ivstruct->intval.day_second.day,
- ivsign, ivstruct->intval.day_second.hour,
- ivstruct->intval.day_second.minute,
- ivstruct->intval.day_second.second);
+ sprintf(param_string, "%s%u days %s%02u:%02u:%02u",
+ ivsign, (unsigned int) ivstruct->intval.day_second.day,
+ ivsign, (unsigned int) ivstruct->intval.day_second.hour,
+ (unsigned int) ivstruct->intval.day_second.minute,
+ (unsigned int) ivstruct->intval.day_second.second);
if (ivstruct->intval.day_second.fraction > 0)
{
int fraction = ivstruct->intval.day_second.fraction, prec = apara->precision;