Skip to content

Commit

Permalink
Merge pull request #48 from blooo-io/feat/LDG-625-clean-up-codeql-hea…
Browse files Browse the repository at this point in the history
…ders-2

Feat/LDG-625-clean-up-codeql-headers-2
  • Loading branch information
n4l5u0r authored Dec 12, 2024
2 parents 3d017e1 + 0a10b1f commit a2c06ac
Show file tree
Hide file tree
Showing 16 changed files with 15 additions and 66 deletions.
5 changes: 1 addition & 4 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
{
"name": "Nano S+",
"includePath": [
"/usr/include",
"${workspaceFolder}/src",
"${env:BOLOS_SDK}/include/*",
"${env:BOLOS_SDK}/lib_ux/include/*"
"${workspaceFolder}/src"
],
"defines": [
"TARGET_NANOS2",
Expand Down
5 changes: 1 addition & 4 deletions src/common/base58check.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef BASE58_CHECK_H
#define BASE58_CHECK_H
#pragma once

int encode_base58(const unsigned char *in, size_t length, unsigned char *out, size_t *outlen);

Expand All @@ -14,5 +13,3 @@ int base58check_encode(const unsigned char *in,
size_t inlength,
unsigned char *out,
size_t *outlen);

#endif
6 changes: 0 additions & 6 deletions src/common/handler.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@

#ifndef _HANDLER_C_
#define _HANDLER_C_

#include <stdbool.h>
#include <string.h>

Expand Down Expand Up @@ -87,5 +83,3 @@ int handler(uint8_t INS,
}
return 0;
}

#endif
5 changes: 1 addition & 4 deletions src/common/handler.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _HANDLER_H_
#define _HANDLER_H_
#pragma once

#include "../globals.h"

Expand Down Expand Up @@ -56,5 +55,3 @@ int handler(uint8_t INS,
uint8_t lc,
volatile unsigned int *flags,
bool isInitialCall);

#endif
5 changes: 1 addition & 4 deletions src/common/mainHelpers.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef MAIN_HELPERS_H
#define MAIN_HELPERS_H
#pragma once

#include "os.h"

Expand All @@ -8,5 +7,3 @@ void concordium_main(
void *global_state);

// void app_exit(void);

#endif
5 changes: 1 addition & 4 deletions src/common/numberHelpers.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _NUMBER_HELPERS_H_
#define _NUMBER_HELPERS_H_
#pragma once

#include <stddef.h>
#include "stdint.h"
Expand Down Expand Up @@ -71,5 +70,3 @@ size_t fractionToPercentageDisplay(uint8_t *dst, size_t dstLength, uint32_t numb
* @param asHexSize the number of characters that may be written to 'asHex'
*/
void toPaginatedHex(uint8_t *byteArray, const uint64_t len, char *asHex, size_t asHexSize);

#endif
4 changes: 1 addition & 3 deletions src/common/responseCodes.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _CONCORDIUM_APP_ERROR_CODES_H_
#define _CONCORDIUM_APP_ERROR_CODES_H_
#pragma once

enum {
// Successful codes
Expand All @@ -26,4 +25,3 @@ enum {
ERROR_DEVICE_LOCKED = 0x530C,
SW_WRONG_DATA_LENGTH = 0x6A87
};
#endif
5 changes: 1 addition & 4 deletions src/common/time.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _CONCORDIUM_APP_TIME_H_
#define _CONCORDIUM_APP_TIME_H_
#pragma once

#include <os.h>

Expand All @@ -24,5 +23,3 @@ int secondsToTm(long long, tm *);
* the format yyyy-mm-dd hh:mm:ss.
*/
int timeToDisplayText(tm time, uint8_t *dst, size_t dstLength);

#endif
5 changes: 1 addition & 4 deletions src/common/ui/display.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
#ifndef _CBOR_H_
#define _CBOR_H_
#pragma once

#include "ux.h"

#endif

#ifdef HAVE_BAGL

extern const ux_flow_step_t ux_display_memo_step_nocb;
Expand Down
5 changes: 1 addition & 4 deletions src/common/util.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _CONCORDIUM_APP_UTIL_H_
#define _CONCORDIUM_APP_UTIL_H_
#pragma once

#include <stdbool.h>
#include <string.h>
Expand Down Expand Up @@ -203,5 +202,3 @@ void getBlsPrivateKey(uint32_t *keyPathInput,
* @param sizeOfDst the size of dst
*/
size_t hashAndLoadU64Ratio(uint8_t *cdata, uint8_t *dst, uint8_t sizeOfDst);

#endif
5 changes: 1 addition & 4 deletions src/globals.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _GLOBALS_H_
#define _GLOBALS_H_
#pragma once

#include <stdbool.h>

Expand Down Expand Up @@ -142,5 +141,3 @@ typedef struct internal_storage_t {
extern const internal_storage_t N_storage_real;

#define N_storage (*(volatile internal_storage_t *) PIC(&N_storage_real))

#endif
5 changes: 1 addition & 4 deletions src/signCredentialDeployment.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _CONCORDIUM_APP_SIGN_CREDENTIAL_DEPLOYMENT_H_
#define _CONCORDIUM_APP_SIGN_CREDENTIAL_DEPLOYMENT_H_
#pragma once

#include "cx.h"
#include "os.h"
Expand Down Expand Up @@ -71,5 +70,3 @@ typedef struct {
protocolState_t state;
bool showIntro;
} signCredentialDeploymentContext_t;

#endif
6 changes: 1 addition & 5 deletions src/signEncryptedAmountTransfer.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#ifndef _CONCORDIUM_APP_ACCOUNT_ENCRYPTED_AMOUNT_TRANSFER_H_
#define _CONCORDIUM_APP_ACCOUNT_ENCRYPTED_AMOUNT_TRANSFER_H_

#pragma once
/**
* Handles the signing flow, including updating the display, for the 'encrypted amount transfer'
* account transaction.
Expand Down Expand Up @@ -32,5 +30,3 @@ typedef struct {
uint16_t proofSize;
encryptedAmountTransferState_t state;
} signEncryptedAmountToTransfer_t;

#endif
5 changes: 1 addition & 4 deletions src/signRegisterData.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _CONCORDIUM_APP_ACCOUNT_REGISTER_DATA_H_
#define _CONCORDIUM_APP_ACCOUNT_REGISTER_DATA_H_
#pragma once

/**
* Handles the signing flow, including updating the display, for the 'register data'
Expand All @@ -25,5 +24,3 @@ typedef struct {
} signRegisterData_t;

void handleData(void);

#endif
5 changes: 1 addition & 4 deletions src/signTransfer.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _CONCORDIUM_APP_ACCOUNT_TRANSFER_H_
#define _CONCORDIUM_APP_ACCOUNT_TRANSFER_H_
#pragma once

/**
* Handles the signing flow, including updating the display, for the 'simple transfer'
Expand Down Expand Up @@ -31,5 +30,3 @@ typedef struct {
uint8_t displayAmount[30];
simpleTransferState_t state;
} signTransferContext_t;

#endif
5 changes: 1 addition & 4 deletions src/verifyAddress.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _CONCORDIUM_APP_VERIFY_ADDRESS_H_
#define _CONCORDIUM_APP_VERIFY_ADDRESS_H_
#pragma once

void handleVerifyAddress(uint8_t *cdata, uint8_t p1, volatile unsigned int *flags);

Expand All @@ -9,5 +8,3 @@ typedef struct {
} verifyAddressContext_t;

void uiVerifyAddress(volatile unsigned int *flags);

#endif

0 comments on commit a2c06ac

Please sign in to comment.