Zondax / ledger-zcash

Zcash app for Ledger Nano S and X
Apache License 2.0
16 stars 11 forks source link

Update license and fix header #95

Closed neithanmo closed 4 months ago

neithanmo commented 4 months ago
github-actions[bot] commented 4 months ago

Cpp-Linter Report :warning:

Some files did not pass the configured checks!

clang-tidy reports: 78 concern(s) - **app/rust/include/zip32.h:3:14:** error: [clang-diagnostic-error] > unknown type name 'uint32_t' ```h void get_pkd(uint32_t zip32_account, const uint8_t *diversifier_ptr, uint8_t *pkd); ^ ``` - **app/rust/include/zip32.h:3:44:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void get_pkd(uint32_t zip32_account, const uint8_t *diversifier_ptr, uint8_t *pkd); ^ ``` - **app/rust/include/zip32.h:3:70:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void get_pkd(uint32_t zip32_account, const uint8_t *diversifier_ptr, uint8_t *pkd); ^ ``` - **app/rust/include/zip32.h:5:24:** error: [clang-diagnostic-error] > unknown type name 'uint32_t' ```h void get_pkd_from_seed(uint32_t zip32_account, const uint8_t *start_index, uint8_t *diversifier_ptr, uint8_t *pkd); ^ ``` - **app/rust/include/zip32.h:5:54:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void get_pkd_from_seed(uint32_t zip32_account, const uint8_t *start_index, uint8_t *diversifier_ptr, uint8_t *pkd); ^ ``` - **app/rust/include/zip32.h:5:76:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void get_pkd_from_seed(uint32_t zip32_account, const uint8_t *start_index, uint8_t *diversifier_ptr, uint8_t *pkd); ^ ``` - **app/rust/include/zip32.h:5:102:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void get_pkd_from_seed(uint32_t zip32_account, const uint8_t *start_index, uint8_t *diversifier_ptr, uint8_t *pkd); ^ ``` - **app/rust/include/zip32.h:7:1:** error: [clang-diagnostic-error] > unknown type name 'bool' ```h bool diversifier_is_valid(const uint8_t *diversifier); ^ ``` - **app/rust/include/zip32.h:7:33:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h bool diversifier_is_valid(const uint8_t *diversifier); ^ ``` - **app/rust/include/zip32.h:9:27:** error: [clang-diagnostic-error] > unknown type name 'uint32_t' ```h void diversifier_get_list(uint32_t zip32_account, const uint8_t *startindex, uint8_t *diversifier_list); ^ ``` - **app/rust/include/zip32.h:9:57:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void diversifier_get_list(uint32_t zip32_account, const uint8_t *startindex, uint8_t *diversifier_list); ^ ``` - **app/rust/include/zip32.h:9:78:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void diversifier_get_list(uint32_t zip32_account, const uint8_t *startindex, uint8_t *diversifier_list); ^ ``` - **app/rust/include/zip32.h:11:29:** error: [clang-diagnostic-error] > unknown type name 'uint32_t' ```h void diversifier_find_valid(uint32_t zip32_account, uint8_t *default_diversifier); ^ ``` - **app/rust/include/zip32.h:11:53:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void diversifier_find_valid(uint32_t zip32_account, uint8_t *default_diversifier); ^ ``` - **app/rust/include/zip32.h:15:26:** error: [clang-diagnostic-error] > unknown type name 'uint32_t' ```h void zip32_child_ask_nsk(uint32_t account, uint8_t *ask, uint8_t *nsk); ^ ``` - **app/rust/include/zip32.h:15:44:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void zip32_child_ask_nsk(uint32_t account, uint8_t *ask, uint8_t *nsk); ^ ``` - **app/rust/include/zip32.h:15:58:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void zip32_child_ask_nsk(uint32_t account, uint8_t *ask, uint8_t *nsk); ^ ``` - **app/rust/include/zip32.h:17:28:** error: [clang-diagnostic-error] > unknown type name 'uint32_t' ```h void zip32_child_proof_key(uint32_t account, uint8_t *ak_ptr, uint8_t *nsk_ptr); ^ ``` - **app/rust/include/zip32.h:17:46:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void zip32_child_proof_key(uint32_t account, uint8_t *ak_ptr, uint8_t *nsk_ptr); ^ ``` - **app/rust/include/notes.h:3:30:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void rseed_get_esk_epk(const uint8_t *rseed_ptr, uint8_t *d_ptr, uint8_t *output_esk_ptr, uint8_t *output_epk_ptr); ^ ``` - **app/rust/include/notes.h:3:50:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void rseed_get_esk_epk(const uint8_t *rseed_ptr, uint8_t *d_ptr, uint8_t *output_esk_ptr, uint8_t *output_epk_ptr); ^ ``` - **app/rust/include/notes.h:3:66:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void rseed_get_esk_epk(const uint8_t *rseed_ptr, uint8_t *d_ptr, uint8_t *output_esk_ptr, uint8_t *output_epk_ptr); ^ ``` - **app/rust/include/notes.h:3:91:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void rseed_get_esk_epk(const uint8_t *rseed_ptr, uint8_t *d_ptr, uint8_t *output_esk_ptr, uint8_t *output_epk_ptr); ^ ``` - **app/rust/include/notes.h:5:26:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void rseed_get_rcm(const uint8_t *rseed_ptr, uint8_t *output_ptr); ^ ``` - **app/rust/include/notes.h:5:46:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void rseed_get_rcm(const uint8_t *rseed_ptr, uint8_t *output_ptr); ^ ``` - **app/rust/include/notes.h:7:16:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void ka_to_key(uint8_t *esk_ptr, uint8_t *pkd_ptr, uint8_t *epk_ptr, uint8_t *output_ptr); ^ ``` - **app/rust/include/notes.h:7:34:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void ka_to_key(uint8_t *esk_ptr, uint8_t *pkd_ptr, uint8_t *epk_ptr, uint8_t *output_ptr); ^ ``` - **app/rust/include/notes.h:7:52:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void ka_to_key(uint8_t *esk_ptr, uint8_t *pkd_ptr, uint8_t *epk_ptr, uint8_t *output_ptr); ^ ``` - **app/rust/include/notes.h:7:70:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void ka_to_key(uint8_t *esk_ptr, uint8_t *pkd_ptr, uint8_t *epk_ptr, uint8_t *output_ptr); ^ ``` - **app/rust/include/notes.h:9:27:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void prepare_compact_note(uint8_t *d, uint64_t value, uint8_t *rcm_ptr, uint8_t memotype, uint8_t *out_ptr); ^ ``` - **app/rust/include/notes.h:9:39:** error: [clang-diagnostic-error] > unknown type name 'uint64_t' ```h void prepare_compact_note(uint8_t *d, uint64_t value, uint8_t *rcm_ptr, uint8_t memotype, uint8_t *out_ptr); ^ ``` - **app/rust/include/notes.h:9:55:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void prepare_compact_note(uint8_t *d, uint64_t value, uint8_t *rcm_ptr, uint8_t memotype, uint8_t *out_ptr); ^ ``` - **app/rust/include/notes.h:9:73:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void prepare_compact_note(uint8_t *d, uint64_t value, uint8_t *rcm_ptr, uint8_t memotype, uint8_t *out_ptr); ^ ``` - **app/rust/include/notes.h:9:91:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void prepare_compact_note(uint8_t *d, uint64_t value, uint8_t *rcm_ptr, uint8_t memotype, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:3:24:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void compute_nullifier(uint8_t *ncm_ptr, uint64_t note_pos, const uint8_t *nsk_ptr, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:3:42:** error: [clang-diagnostic-error] > unknown type name 'uint64_t' ```h void compute_nullifier(uint8_t *ncm_ptr, uint64_t note_pos, const uint8_t *nsk_ptr, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:3:67:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void compute_nullifier(uint8_t *ncm_ptr, uint64_t note_pos, const uint8_t *nsk_ptr, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:3:85:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void compute_nullifier(uint8_t *ncm_ptr, uint64_t note_pos, const uint8_t *nsk_ptr, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:6:11:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^ /__w/ledger-zcash/ledger-zcash/app/rust/include/commitments.h:6:29: error: parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors] const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^~~~~~ ``` - **app/rust/include/commitments.h:6:35:** error: [clang-diagnostic-error] > unknown type name 'uint64_t' ```h const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:6:57:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:6:89:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:6:103:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:9:11:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^ /__w/ledger-zcash/ledger-zcash/app/rust/include/commitments.h:9:29: error: parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors] const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^~~~~~ ``` - **app/rust/include/commitments.h:9:35:** error: [clang-diagnostic-error] > unknown type name 'uint64_t' ```h const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:9:57:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:9:89:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:9:103:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h const uint8_t *rcm_ptr, const uint64_t value, const uint8_t *diversifier_ptr, const uint8_t *pkd, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:11:37:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void compute_value_commitment(const uint8_t *rcm_ptr, const uint64_t value, uint8_t *out_ptr); ^ /__w/ledger-zcash/ledger-zcash/app/rust/include/commitments.h:11:55: error: parameter 'value' is const-qualified in the function declaration; const-qualification of parameters only has an effect in function definitions [readability-avoid-const-params-in-decls,-warnings-as-errors] void compute_value_commitment(const uint8_t *rcm_ptr, const uint64_t value, uint8_t *out_ptr); ^~~~~~ ``` - **app/rust/include/commitments.h:11:61:** error: [clang-diagnostic-error] > unknown type name 'uint64_t' ```h void compute_value_commitment(const uint8_t *rcm_ptr, const uint64_t value, uint8_t *out_ptr); ^ ``` - **app/rust/include/commitments.h:11:77:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h void compute_value_commitment(const uint8_t *rcm_ptr, const uint64_t value, uint8_t *out_ptr); ^ ``` - **app/src/key.h:25:5:** error: [clang-diagnostic-error] > unknown type name 'key_type_e' ```h key_type_e kind; ^ ``` - **app/src/key.h:26:5:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h uint8_t len; ^ ``` - **app/src/key.h:30:25:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t key_getNumItems(uint8_t *num_items); ^ ``` - **app/src/key.h:33:21:** error: [clang-diagnostic-error] > unknown type name 'int8_t' ```h zxerr_t key_getItem(int8_t displayIdx, ^ ``` - **app/src/key.h:35:21:** error: [clang-diagnostic-error] > unknown type name 'uint16_t' ```h uint16_t outKeyLen, ^ ``` - **app/src/key.h:37:21:** error: [clang-diagnostic-error] > unknown type name 'uint16_t' ```h uint16_t outValueLen, ^ ``` - **app/src/key.h:38:21:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h uint8_t pageIdx, ^ ``` - **app/src/key.h:39:21:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h uint8_t *pageCount); ^ ``` - **app/src/refactor/txid.h:19:1:** error: [clang-diagnostic-error] > unknown type name 'zxerr_t' ```h zxerr_t nu5_transparent_prevouts_hash(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:19:45:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t nu5_transparent_prevouts_hash(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:19:61:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t nu5_transparent_prevouts_hash(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:21:1:** error: [clang-diagnostic-error] > unknown type name 'zxerr_t' ```h zxerr_t nu5_transparent_sequence_hash(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:21:45:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t nu5_transparent_sequence_hash(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:21:61:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t nu5_transparent_sequence_hash(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:23:1:** error: [clang-diagnostic-error] > unknown type name 'zxerr_t' ```h zxerr_t nu5_transparent_outputs_hash(uint8_t *output); ^ ``` - **app/src/refactor/txid.h:23:38:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t nu5_transparent_outputs_hash(uint8_t *output); ^ ``` - **app/src/refactor/txid.h:25:1:** error: [clang-diagnostic-error] > unknown type name 'zxerr_t' ```h zxerr_t nu5_hash_sapling_spends(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:25:39:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t nu5_hash_sapling_spends(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:25:55:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t nu5_hash_sapling_spends(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:27:1:** error: [clang-diagnostic-error] > unknown type name 'zxerr_t' ```h zxerr_t nu5_hash_sapling_outputs(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:27:40:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t nu5_hash_sapling_outputs(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:27:56:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t nu5_hash_sapling_outputs(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:29:1:** error: [clang-diagnostic-error] > unknown type name 'zxerr_t' ```h zxerr_t hash_header_txid_data(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:29:37:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t hash_header_txid_data(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:29:53:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t hash_header_txid_data(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:31:1:** error: [clang-diagnostic-error] > unknown type name 'zxerr_t' ```h zxerr_t hash_transparent_txid_data(const uint8_t *input, uint8_t *output); ^ ``` - **app/src/refactor/txid.h:31:42:** error: [clang-diagnostic-error] > unknown type name 'uint8_t' ```h zxerr_t hash_transparent_txid_data(const uint8_t *input, uint8_t *output); ^ ```

Have any feedback or feature suggestions? Share it here.