Skip to content

Commit

Permalink
maint(gpg2john.c): add missing prototypes
Browse files Browse the repository at this point in the history
The clang compiler was complaining with the error message: "Passing
arguments to a function without a prototype is deprecated in all
versions of C".

Signed-off-by: Claudio André <dev@claudioandre.slmail.me>
  • Loading branch information
claudioandre-br committed Dec 2, 2024
1 parent 364b1ca commit 0251a0f
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions src/gpg2john.c
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ Private_Packet(int len)
*/


typedef void (*funcptr)();
typedef void (*funcptr)(int);

private int get_new_len(int);
private int is_partial(int);
Expand Down Expand Up @@ -1295,27 +1295,25 @@ TAG[] = {
#define TAG_NUM (sizeof(TAG) * sizeof(string))

private void
(*tag_func[])() = {
Reserved,
Public_Key_Encrypted_Session_Key_Packet,
Signature_Packet,
Symmetric_Key_Encrypted_Session_Key_Packet,
One_Pass_Signature_Packet,
Secret_Key_Packet,
Public_Key_Packet,
Secret_Subkey_Packet,
Compressed_Data_Packet,
(*tag_func[])(int, int, int, char *) = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
Symmetrically_Encrypted_Data_Packet,
Marker_Packet,
Literal_Data_Packet,
Trust_Packet,
User_ID_Packet,
Public_Subkey_Packet,
NULL,
NULL,
User_Attribute_Packet,
NULL,
NULL,
NULL,
NULL,
NULL,
Symmetrically_Encrypted_and_MDC_Packet,
Modification_Detection_Code_Packet,
NULL,
NULL,
NULL,
Expand Down Expand Up @@ -1357,10 +1355,11 @@ private void
NULL,
NULL,
NULL,
Private_Packet,
Private_Packet,
Private_Packet,
Private_Packet,
NULL,
NULL,
NULL,
NULL,
NULL,
};

char *pkt_type(int tag) {
Expand Down

0 comments on commit 0251a0f

Please sign in to comment.