/* It must be cut off double quotation because new_variable() double-quotes. */
str[strlen(str) - 1] = '\0';
- sprintf(length, "%d", (int) strlen(str));
+ sprintf(length, "%zu", strlen(str));
add_variable_to_tail(&argsinsert, new_variable(str, ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
}
output_statement(cat_str(3, mm_strdup("execute"), mm_strdup("$0"), $1.type), 0, ECPGst_exec_with_exprlist);
/* It must be cut off double quotation because new_variable() double-quotes. */
str[strlen(str) - 1] = '\0';
- sprintf(length, "%d", (int) strlen(str));
+ sprintf(length, "%zu", strlen(str));
add_variable_to_tail(&argsinsert, new_variable(str, ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
}
output_statement(cat_str(5, mm_strdup("prepare"), mm_strdup("$0"), $1.type, mm_strdup("as"), $1.stmt), 0, ECPGst_prepare);
{
char *length = mm_alloc(32);
- sprintf(length, "%d", (int) strlen($1));
+ sprintf(length, "%zu", strlen($1));
add_variable_to_head(&argsinsert, new_variable($1, ECPGmake_simple_type(ECPGt_const, length, 0), 0), &no_indicator);
}
| civar { $$ = EMPTY; }
{
char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
- sprintf(length, "%d", (int) strlen($1));
+ sprintf(length, "%zu", strlen($1));
new_variable($1, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
$$ = $1;
}
{
char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
- sprintf(length, "%d", (int) strlen($1));
+ sprintf(length, "%zu", strlen($1));
new_variable($1, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
$$ = $1;
}
char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
char *var = cat2_str(mm_strdup("-"), $2);
- sprintf(length, "%d", (int) strlen(var));
+ sprintf(length, "%zu", strlen(var));
new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
$$ = var;
}
char *length = mm_alloc(sizeof(int) * CHAR_BIT * 10 / 3);
char *var = cat2_str(mm_strdup("-"), $2);
- sprintf(length, "%d", (int) strlen(var));
+ sprintf(length, "%zu", strlen(var));
new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
$$ = var;
}
char *var = $1 + 1;
var[strlen(var) - 1] = '\0';
- sprintf(length, "%d", (int) strlen(var));
+ sprintf(length, "%zu", strlen(var));
new_variable(var, ECPGmake_simple_type(ECPGt_const, length, 0), 0);
$$ = var;
}