aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFournier Nicolas <nicolas.fournier@ensta-paristech.fr>2015-06-24 14:42:03 +0200
committerFournier Nicolas <nicolas.fournier@ensta-paristech.fr>2015-06-24 14:42:03 +0200
commitc3b29bf7e70b3e7f36a4e1c6eb18f5a665baf8fc (patch)
tree20dfd11183d33d43c790dbad15d81a2193230abc /src
parentb77bb5caa0c2f53bc4c1354c45d66fbc7beeac4a (diff)
Fixed unconsistent signed/unsigned declaration
Diffstat (limited to 'src')
-rw-r--r--src/mintdb/perf_taler_mintdb.c1
-rw-r--r--src/mintdb/perf_taler_mintdb_interpreter.c22
-rw-r--r--src/mintdb/perf_taler_mintdb_interpreter.h2
3 files changed, 12 insertions, 13 deletions
diff --git a/src/mintdb/perf_taler_mintdb.c b/src/mintdb/perf_taler_mintdb.c
index a39fdd811..48a7dd743 100644
--- a/src/mintdb/perf_taler_mintdb.c
+++ b/src/mintdb/perf_taler_mintdb.c
@@ -38,7 +38,6 @@ main (int argc, char ** argv)
PERF_TALER_MINTDB_INIT_CMD_START_TRANSACTION ("start_transaction_init"),
PERF_TALER_MINTDB_INIT_CMD_INSERT_DEPOSIT ("init_deposit_insert"),
PERF_TALER_MINTDB_INIT_CMD_COMMIT_TRANSACTION ("commit_transaction_init"),
- PERF_TALER_MINTDB_INIT_CMD_DEBUG("INIT_LOOP"),
PERF_TALER_MINTDB_INIT_CMD_SAVE_ARRAY ("array_depo",
"loop_db_init_deposit",
"init_deposit_insert",
diff --git a/src/mintdb/perf_taler_mintdb_interpreter.c b/src/mintdb/perf_taler_mintdb_interpreter.c
index 4d7a17cbb..b54fda1c9 100644
--- a/src/mintdb/perf_taler_mintdb_interpreter.c
+++ b/src/mintdb/perf_taler_mintdb_interpreter.c
@@ -47,7 +47,7 @@ struct PERF_TALER_MINTDB_interpreter_state
/**
* The current index of the interpreter
*/
- int i;
+ unsigned int i;
};
/**
@@ -99,7 +99,7 @@ data_free (union PERF_TALER_MINTDB_Data *data, enum PERF_TALER_MINTDB_Type type)
static int
cmd_find (const struct PERF_TALER_MINTDB_Cmd *cmd, const char *search)
{
- int i;
+ unsigned int i;
for (i=0; PERF_TALER_MINTDB_CMD_END != cmd[i].command; i++)
if (0 == strcmp (cmd[i].label, search))
@@ -114,7 +114,7 @@ cmd_find (const struct PERF_TALER_MINTDB_Cmd *cmd, const char *search)
static int
cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
{
- int i = 0;
+ unsigned int i = 0;
for (i=0; PERF_TALER_MINTDB_CMD_END != cmd[i].command; i++)
{
@@ -158,7 +158,7 @@ cmd_init (struct PERF_TALER_MINTDB_Cmd cmd[])
static int
cmd_clean (struct PERF_TALER_MINTDB_Cmd cmd[])
{
- int i = 0;
+ unsigned int i = 0;
for (i = 0; PERF_TALER_MINTDB_CMD_END != cmd[i].command; i++)
{
@@ -166,7 +166,7 @@ cmd_clean (struct PERF_TALER_MINTDB_Cmd cmd[])
{
case PERF_TALER_MINTDB_CMD_SAVE_ARRAY:
{
- int j;
+ unsigned int j;
for (j = 0; j < cmd[i].details.save_array.nb_saved; j++)
{
data_free (&cmd[i].details.save_array.data_saved[j],
@@ -198,9 +198,9 @@ cmd_clean (struct PERF_TALER_MINTDB_Cmd cmd[])
static void
interpret_end_loop (struct PERF_TALER_MINTDB_interpreter_state *state)
{
- int i;
+ unsigned int i;
union PERF_TALER_MINTDB_Data zero = {0};
- int jump = cmd_find (state->cmd,
+ unsigned int jump = cmd_find (state->cmd,
state->cmd[state->i].details.end_loop.label_loop);
// Cleaning up the memory in the loop
for (i = jump; i < state->i; i++)
@@ -234,8 +234,8 @@ interpret_end_loop (struct PERF_TALER_MINTDB_interpreter_state *state)
static void
interpret_save_array (struct PERF_TALER_MINTDB_interpreter_state *state)
{
- int loop_index;
- int selection_chance;
+ unsigned int loop_index;
+ unsigned int selection_chance;
// Array initialization on first loop iteration
// Alows for nested loops
@@ -316,7 +316,7 @@ interpret_save_array (struct PERF_TALER_MINTDB_interpreter_state *state)
static void
interpret_load_array (struct PERF_TALER_MINTDB_interpreter_state *state)
{
- int loop_index, save_index;
+ unsigned int loop_index, save_index;
union PERF_TALER_MINTDB_Data zero = {0};
union PERF_TALER_MINTDB_Data *loaded_data;
@@ -392,7 +392,7 @@ interpret (struct PERF_TALER_MINTDB_interpreter_state *state)
case PERF_TALER_MINTDB_CMD_GAUGER:
{
- int start_index, stop_index;
+ unsigned int start_index, stop_index;
struct timespec start, stop;
unsigned long elapsed_ms;
diff --git a/src/mintdb/perf_taler_mintdb_interpreter.h b/src/mintdb/perf_taler_mintdb_interpreter.h
index 164379076..49f06b6ea 100644
--- a/src/mintdb/perf_taler_mintdb_interpreter.h
+++ b/src/mintdb/perf_taler_mintdb_interpreter.h
@@ -347,7 +347,7 @@ struct PERF_TALER_MINTDB_CMD_loop_details
{
// Maximum number of iteration in the loop
const unsigned int max_iterations;
- int curr_iteration;
+ unsigned int curr_iteration;
};