Fix last compilation warnings
Signed-off-by: pscott <scott.piriou@ledger.fr>
This commit is contained in:
committed by
pscott
parent
46d5b45e9c
commit
c27d59d792
2
Makefile
2
Makefile
@@ -312,7 +312,7 @@ endif
|
||||
CC := $(CLANGPATH)clang
|
||||
|
||||
#CFLAGS += -O0
|
||||
CFLAGS += -O3 -Os -Wno-format-invalid-specifier -Wno-format-extra-args -Wno-main
|
||||
CFLAGS += -O3 -Os -Wno-format-invalid-specifier -Wno-format-extra-args
|
||||
|
||||
AS := $(GCCPATH)arm-none-eabi-gcc
|
||||
|
||||
|
||||
Submodule ethereum-plugin-sdk updated: aeaf6450c3...394febefb7
@@ -13,6 +13,11 @@ typedef enum {
|
||||
|
||||
} plugin_ui_state_t;
|
||||
|
||||
#ifdef TARGET_NANOS
|
||||
// This function is not exported by the SDK
|
||||
void ux_layout_paging_redisplay_by_addr(unsigned int stack_slot);
|
||||
#endif
|
||||
|
||||
void computeFees(char *displayBuffer, uint32_t displayBufferSize);
|
||||
|
||||
void plugin_ui_get_id() {
|
||||
|
||||
@@ -59,7 +59,7 @@ int handle_check_address(check_address_parameters_t* params, chain_config_t* cha
|
||||
cx_ecfp_generate_pair(CX_CURVE_256K1, &locals_union2.publicKey, &locals_union1.privateKey, 1);
|
||||
ZERO(locals_union1);
|
||||
getEthAddressStringFromKey(&locals_union2.publicKey,
|
||||
(uint8_t*) locals_union1.address,
|
||||
locals_union1.address,
|
||||
&local_sha3,
|
||||
chain_config);
|
||||
ZERO(locals_union2);
|
||||
|
||||
@@ -79,7 +79,7 @@ typedef struct tokenContext_t {
|
||||
|
||||
typedef struct publicKeyContext_t {
|
||||
cx_ecfp_public_key_t publicKey;
|
||||
uint8_t address[41];
|
||||
char address[41];
|
||||
uint8_t chainCode[INT256_LENGTH];
|
||||
bool getChaincode;
|
||||
} publicKeyContext_t;
|
||||
|
||||
@@ -134,7 +134,7 @@ void getEthAddressStringFromKey(cx_ecfp_public_key_t *publicKey,
|
||||
}
|
||||
|
||||
void getEthAddressStringFromBinary(uint8_t *address,
|
||||
uint8_t *out,
|
||||
char *out,
|
||||
cx_sha3_t *sha3Context,
|
||||
chain_config_t *chain_config) {
|
||||
// save some precious stack space
|
||||
|
||||
@@ -45,7 +45,7 @@ void getEthAddressStringFromKey(cx_ecfp_public_key_t *publicKey,
|
||||
chain_config_t *chain_config);
|
||||
|
||||
void getEthAddressStringFromBinary(uint8_t *address,
|
||||
uint8_t *out,
|
||||
char *out,
|
||||
cx_sha3_t *sha3Context,
|
||||
chain_config_t *chain_config);
|
||||
|
||||
|
||||
@@ -385,7 +385,7 @@ void finalizeParsing(bool direct) {
|
||||
displayBuffer[0] = '0';
|
||||
displayBuffer[1] = 'x';
|
||||
getEthAddressStringFromBinary(tmpContent.txContent.destination,
|
||||
(uint8_t *) displayBuffer + 2,
|
||||
displayBuffer + 2,
|
||||
&global_sha3,
|
||||
chainConfig);
|
||||
compareOrCopy(strings.common.fullAddress, displayBuffer, called_from_swap);
|
||||
|
||||
@@ -17,7 +17,7 @@ void stark_sign_display_condition_address() {
|
||||
strings.tmp.tmp[0] = '0';
|
||||
strings.tmp.tmp[1] = 'x';
|
||||
getEthAddressStringFromBinary(dataContext.starkContext.conditionAddress,
|
||||
(uint8_t *) (strings.tmp.tmp + 2),
|
||||
strings.tmp.tmp + 2,
|
||||
&global_sha3,
|
||||
chainConfig);
|
||||
strings.tmp.tmp[42] = '\0';
|
||||
|
||||
@@ -209,7 +209,7 @@ void erc20_plugin_call(int message, void *parameters) {
|
||||
msg->msg[0] = '0';
|
||||
msg->msg[1] = 'x';
|
||||
getEthAddressStringFromBinary(context->destinationAddress,
|
||||
(uint8_t *) msg->msg + 2,
|
||||
msg->msg + 2,
|
||||
msg->pluginSharedRW->sha3,
|
||||
chainConfig);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ typedef struct eth2_deposit_parameters_t {
|
||||
static int getEthDisplayableAddress(char *out, uint8_t *in, cx_sha3_t *sha3) {
|
||||
out[0] = '0';
|
||||
out[1] = 'x';
|
||||
getEthAddressStringFromBinary(in, (uint8_t *) out + 2, sha3, chainConfig);
|
||||
getEthAddressStringFromBinary(in, out + 2, sha3, chainConfig);
|
||||
|
||||
uint8_t destinationLen = strlen(out) + 1; // Adding one to account for \0.
|
||||
|
||||
|
||||
@@ -284,7 +284,7 @@ void starkware_print_eth_address(uint8_t *address, char *destination) {
|
||||
destination[0] = '0';
|
||||
destination[1] = 'x';
|
||||
getEthAddressStringFromBinary(address,
|
||||
(uint8_t *) (destination + 2),
|
||||
destination + 2,
|
||||
&global_sha3,
|
||||
chainConfig);
|
||||
destination[42] = '\0';
|
||||
@@ -369,7 +369,7 @@ void starkware_get_source_address(char *destination) {
|
||||
destination[0] = '0';
|
||||
destination[1] = 'x';
|
||||
getEthAddressStringFromKey(&publicKey,
|
||||
(uint8_t *) (destination + 2),
|
||||
destination + 2,
|
||||
&global_sha3,
|
||||
chainConfig);
|
||||
destination[42] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user