From 28ca3e8c22784c9df27031cee294ff92fee9d5d3 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 9 Apr 2019 22:42:23 +0200 Subject: [PATCH] on prototypes, void means sth --- client/cliparser/cliparser.h | 2 +- client/cmddata.h | 2 +- client/cmdhf.h | 4 ++-- client/cmdhflist.h | 2 +- client/cmdlfpcf7931.h | 10 +++++----- client/cmdmain.h | 2 +- client/comms.h | 4 ++-- client/graph.h | 2 +- client/hardnested/hardnested_bf_core.h | 2 +- client/hardnested/hardnested_bruteforce.h | 2 +- client/loclass/cipher.h | 2 +- client/loclass/cipherutils.h | 2 +- client/loclass/elite_crack.h | 2 +- client/loclass/hash1_brute.h | 2 +- client/util_darwin.h | 6 +++--- client/util_posix.h | 2 +- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/client/cliparser/cliparser.h b/client/cliparser/cliparser.h index d1fa19bce..a7c8480f4 100644 --- a/client/cliparser/cliparser.h +++ b/client/cliparser/cliparser.h @@ -35,7 +35,7 @@ int CLIParserInit(char *vprogramName, char *vprogramHint, char *vprogramHelp); int CLIParserParseString(const char *str, void *vargtable[], size_t vargtableLen, bool allowEmptyExec); int CLIParserParseStringEx(const char *str, void *vargtable[], size_t vargtableLen, bool allowEmptyExec, bool clueData); int CLIParserParseArg(int argc, char **argv, void *vargtable[], size_t vargtableLen, bool allowEmptyExec); -void CLIParserFree(); +void CLIParserFree(void); int CLIParamHexToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int *datalen); int CLIParamStrToBuf(struct arg_str *argstr, uint8_t *data, int maxdatalen, int *datalen); diff --git a/client/cmddata.h b/client/cmddata.h index cca722ed4..ce1bfd16a 100644 --- a/client/cmddata.h +++ b/client/cmddata.h @@ -32,7 +32,7 @@ #include "loclass/cipherutils.h" // for decimating samples in getsamples #include "cmdlfem4x.h" // askem410xdecode -command_t *CmdDataCommands(); +command_t *CmdDataCommands(void); int CmdData(const char *Cmd); void printDemodBuff(void); diff --git a/client/cmdhf.h b/client/cmdhf.h index 3237e1df6..9db6795ac 100644 --- a/client/cmdhf.h +++ b/client/cmdhf.h @@ -38,6 +38,6 @@ int CmdHFTune(const char *Cmd); int CmdHFSearch(const char *Cmd); int CmdHFSniff(const char *Cmd); -int usage_hf_search(); -int usage_hf_sniff(); +int usage_hf_search(void); +int usage_hf_sniff(void); #endif diff --git a/client/cmdhflist.h b/client/cmdhflist.h index 35a5493ff..ddc0ab00c 100644 --- a/client/cmdhflist.h +++ b/client/cmdhflist.h @@ -52,7 +52,7 @@ typedef struct { uint32_t ks3; // at ^ at_enc } TAuthData; -void ClearAuthData(); +void ClearAuthData(void); uint8_t iso14443A_CRC_check(bool isResponse, uint8_t *d, uint8_t n); uint8_t iso14443B_CRC_check(uint8_t *d, uint8_t n); diff --git a/client/cmdlfpcf7931.h b/client/cmdlfpcf7931.h index da31877eb..db7c0c8fa 100644 --- a/client/cmdlfpcf7931.h +++ b/client/cmdlfpcf7931.h @@ -19,12 +19,12 @@ struct pcf7931_config { int16_t OffsetPosition; }; -int pcf7931_resetConfig(); -int pcf7931_printConfig(); +int pcf7931_resetConfig(void); +int pcf7931_printConfig(void); -int usage_pcf7931_read(); -int usage_pcf7931_write(); -int usage_pcf7931_config(); +int usage_pcf7931_read(void); +int usage_pcf7931_write(void); +int usage_pcf7931_config(void); int CmdLFPCF7931(const char *Cmd); diff --git a/client/cmdmain.h b/client/cmdmain.h index c729f8d77..8a43ad6b8 100644 --- a/client/cmdmain.h +++ b/client/cmdmain.h @@ -42,6 +42,6 @@ #endif int CommandReceived(char *Cmd); -command_t *getTopLevelCommandTable(); +command_t *getTopLevelCommandTable(void); #endif diff --git a/client/comms.h b/client/comms.h index b8e33beee..483462ac3 100644 --- a/client/comms.h +++ b/client/comms.h @@ -48,11 +48,11 @@ typedef struct { bool dl_it(uint8_t *dest, uint32_t bytes, uint32_t start_index, UsbCommand *response, size_t ms_timeout, bool show_warning, uint32_t rec_cmd); void SetOffline(bool value); -bool IsOffline(); +bool IsOffline(void); void *uart_receiver(void *targ); void SendCommand(UsbCommand *c); -void clearCommandBuffer(); +void clearCommandBuffer(void); #define FLASHMODE_SPEED 460800 bool OpenProxmark(void *port, bool wait_for_port, int timeout, bool flash_mode, uint32_t speed); diff --git a/client/graph.h b/client/graph.h index 05750ab16..98acec8dd 100644 --- a/client/graph.h +++ b/client/graph.h @@ -30,7 +30,7 @@ bool fskClocks(uint8_t *fc1, uint8_t *fc2, uint8_t *rf1, int *firstClockEdge); void setGraphBuf(uint8_t *buff, size_t size); void save_restoreGB(uint8_t saveOpt); -bool HasGraphData(); +bool HasGraphData(void); // Max graph trace len: 40000 (bigbuf) * 8 (at 1 bit per sample) #ifndef MAX_GRAPH_TRACE_LEN diff --git a/client/hardnested/hardnested_bf_core.h b/client/hardnested/hardnested_bf_core.h index 872fa2d08..9dc10961a 100644 --- a/client/hardnested/hardnested_bf_core.h +++ b/client/hardnested/hardnested_bf_core.h @@ -62,7 +62,7 @@ typedef enum { SIMD_NONE, } SIMDExecInstr; void SetSIMDInstr(SIMDExecInstr instr); -SIMDExecInstr GetSIMDInstrAuto(); +SIMDExecInstr GetSIMDInstrAuto(void); const uint64_t crack_states_bitsliced(uint32_t cuid, uint8_t *best_first_bytes, statelist_t *p, uint32_t *keys_found, uint64_t *num_keys_tested, uint32_t nonces_to_bruteforce, uint8_t *bf_test_nonce_2nd_byte, noncelist_t *nonces); void bitslice_test_nonces(uint32_t nonces_to_bruteforce, uint32_t *bf_test_nonce, uint8_t *bf_test_nonce_par); diff --git a/client/hardnested/hardnested_bruteforce.h b/client/hardnested/hardnested_bruteforce.h index 180e537d8..708d48b84 100644 --- a/client/hardnested/hardnested_bruteforce.h +++ b/client/hardnested/hardnested_bruteforce.h @@ -29,7 +29,7 @@ typedef struct { void prepare_bf_test_nonces(noncelist_t *nonces, uint8_t best_first_byte); bool brute_force_bs(float *bf_rate, statelist_t *candidates, uint32_t cuid, uint32_t num_acquired_nonces, uint64_t maximum_states, noncelist_t *nonces, uint8_t *best_first_bytes, uint64_t *found_key); -float brute_force_benchmark(); +float brute_force_benchmark(void); uint8_t trailing_zeros(uint8_t byte); bool verify_key(uint32_t cuid, noncelist_t *nonces, uint8_t *best_first_bytes, uint32_t odd, uint32_t even); diff --git a/client/loclass/cipher.h b/client/loclass/cipher.h index ddf5fecf7..b79dc47cd 100644 --- a/client/loclass/cipher.h +++ b/client/loclass/cipher.h @@ -44,7 +44,7 @@ void doMAC(uint8_t *cc_nr_p, uint8_t *div_key_p, uint8_t mac[4]); void doMAC_N(uint8_t *address_data_p, uint8_t address_data_size, uint8_t *div_key_p, uint8_t mac[4]); #ifndef ON_DEVICE -int testMAC(); +int testMAC(void); #endif #endif // CIPHER_H diff --git a/client/loclass/cipherutils.h b/client/loclass/cipherutils.h index 62afd6729..161e09e48 100644 --- a/client/loclass/cipherutils.h +++ b/client/loclass/cipherutils.h @@ -60,7 +60,7 @@ void pushBit(BitstreamOut *stream, bool bit); int bitsLeft(BitstreamIn *stream); #ifndef ON_DEVICE int testCipherUtils(void); -int testMAC(); +int testMAC(void); #endif void push6bits(BitstreamOut *stream, uint8_t bits); void EncryptDES(bool key[56], bool outBlk[64], bool inBlk[64], int verbose) ; diff --git a/client/loclass/elite_crack.h b/client/loclass/elite_crack.h index 2353fdbac..819d3de47 100644 --- a/client/loclass/elite_crack.h +++ b/client/loclass/elite_crack.h @@ -124,7 +124,7 @@ int calculateMasterKey(uint8_t first16bytes[], uint64_t master_key[]); * @brief Test function * @return */ -int testElite(); +int testElite(void); /** Here are some pretty optimal values that can be used to recover necessary data in only diff --git a/client/loclass/hash1_brute.h b/client/loclass/hash1_brute.h index b26ad96d1..685a2c479 100644 --- a/client/loclass/hash1_brute.h +++ b/client/loclass/hash1_brute.h @@ -1,5 +1,5 @@ #ifndef HASH1_BRUTE_H #define HASH1_BRUTE_H -void brute_hash1(); +void brute_hash1(void); #endif // HASH1_BRUTE_H diff --git a/client/util_darwin.h b/client/util_darwin.h index d89b681f2..709680cdc 100644 --- a/client/util_darwin.h +++ b/client/util_darwin.h @@ -12,8 +12,8 @@ #define UTIL_DARWIN_H__ void disableAppNap(const char *reason); -void enableAppNap(); -void makeUnfocusable(); -void makeFocusable(); +void enableAppNap(void); +void makeUnfocusable(void); +void makeFocusable(void); #endif diff --git a/client/util_posix.h b/client/util_posix.h index d4fecc723..a0a8c8638 100644 --- a/client/util_posix.h +++ b/client/util_posix.h @@ -21,6 +21,6 @@ extern void msleep(uint32_t n); // sleep n milliseconds #endif // _WIN32 -extern uint64_t msclock(); // a milliseconds clock +extern uint64_t msclock(void); // a milliseconds clock #endif