taler-mdb

GNU Taler Extensions and Integrations
Log | Files | Refs | Submodules | README | LICENSE

commit 255ad6e37aadf874237d9ecbecd1ad482bd7b570
parent 251803b9f123069ceb2204342273a63fc85a3642
Author: Christian Grothoff <christian@grothoff.org>
Date:   Mon,  4 Nov 2024 19:34:51 +0100

-fix compiler warnings

Diffstat:
Msrc/taler-mdb.c | 21++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/src/taler-mdb.c b/src/taler-mdb.c @@ -1052,6 +1052,7 @@ show_qrcode (const char *uri) size_t xOff; size_t yOff; const char *dddash; + unsigned int nwidth; stop_advertising (); hide_error (); @@ -1132,9 +1133,11 @@ show_qrcode (const char *uri) * sizeof (uint16_t)); size = GNUNET_MIN (qrDisplay.var_info.xres, qrDisplay.var_info.yres); - unsigned int nwidth = qrc->width + 8; /* +8 for 4 pixel border */ + + nwidth = qrc->width + 8; /* +8 for 4 pixel border */ xOff = 4 * size / nwidth; yOff = 4 * size / nwidth; + /* calculate offset to show the code centered */ if (qrDisplay.var_info.xres < qrDisplay.var_info.yres) yOff += (qrDisplay.var_info.yres - qrDisplay.var_info.xres) / 2; @@ -1940,13 +1943,13 @@ launch_payment (struct Product *product) /* create the json object for the order request */ if (NULL != product->preview) { - json_t *products; + json_t *lproducts; - products = json_array (); - GNUNET_assert (NULL != products); + lproducts = json_array (); + GNUNET_assert (NULL != lproducts); GNUNET_assert ( 0 == - json_array_append_new (products, + json_array_append_new (lproducts, GNUNET_JSON_PACK ( GNUNET_JSON_pack_string ("description", product->description), @@ -1966,7 +1969,7 @@ launch_payment (struct Product *product) #endif GNUNET_JSON_pack_array_steal ( "products", - products), + lproducts), TALER_JSON_pack_amount ("amount", &product->price), GNUNET_JSON_pack_string ("fulfillment_message", @@ -2184,9 +2187,9 @@ vend_failure (void) static void read_keyboard_command (void *cls) { - (void) cls; int input; + (void) cls; keyboard_task = NULL; input = getchar (); if ( (EOF == input) || @@ -2289,9 +2292,9 @@ read_keyboard_command (void *cls) static void cancel_button_pressed (void *cls) { - (void) cls; char value; + (void) cls; cancelbutton_task = NULL; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Cancel button event detected\n"); @@ -2612,6 +2615,7 @@ handle_command (const char *hex, { case VMC_VEND_REQUEST: { + unsigned int product; /* Calculate the checksum and check it */ chkSum = cmd; @@ -2641,7 +2645,6 @@ handle_command (const char *hex, temporary_error ("err-num-read-fail"); break; } - unsigned int product; GNUNET_break (mdb.session_running); /* NOTE: hex[4..7] contain the price */