Skip to content

Commit

Permalink
removing gcc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
thradams committed Mar 8, 2024
1 parent f34cb0c commit 972119e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
12 changes: 4 additions & 8 deletions src/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2270,9 +2270,6 @@ void c_clrscr()
#include <ctype.h>


#include <sys/stat.h>


#include <errno.h>


Expand All @@ -2290,9 +2287,6 @@ void c_clrscr()

#include <direct.h>


#include <sys/types.h>

#ifdef __CAKE__
#pragma cake diagnostic push
#pragma cake diagnostic ignored "-Wstyle"
Expand Down Expand Up @@ -9993,6 +9987,8 @@ int get_diagnostic_phase(enum diagnostic_id w)
case W_OWNERSHIP_FLOW_NULL_DEREFERENCE:
case W_OWNERSHIP_FLOW_MAYBE_NULL_TO_NON_OPT_ARG:
return 2; /*returns 2 if it flow analysis*/
default:
break;
}
return 0;
}
Expand Down Expand Up @@ -11924,7 +11920,7 @@ struct member_declaration

};

struct member_declaration* owner member_declaration(struct parser_ctx* ctx, const struct struct_or_union_specifier*);
struct member_declaration* owner member_declaration(struct parser_ctx* ctx, struct struct_or_union_specifier*);
void member_declaration_delete(struct member_declaration* owner opt p);

struct member_declarator
Expand Down Expand Up @@ -25931,7 +25927,7 @@ void member_declaration_delete(struct member_declaration* owner opt p)
}
}
struct member_declaration* owner member_declaration(struct parser_ctx* ctx,
const struct struct_or_union_specifier* p_struct_or_union_specifier)
struct struct_or_union_specifier* p_struct_or_union_specifier)
{
struct member_declaration* owner p_member_declaration = calloc(1, sizeof(struct member_declaration));
//attribute_specifier_sequence_opt specifier_qualifier_list member_declarator_list_opt ';'
Expand Down
2 changes: 2 additions & 0 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ int get_diagnostic_phase(enum diagnostic_id w)
case W_OWNERSHIP_FLOW_NULL_DEREFERENCE:
case W_OWNERSHIP_FLOW_MAYBE_NULL_TO_NON_OPT_ARG:
return 2; /*returns 2 if it flow analysis*/
default:
break;
}
return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -3360,7 +3360,7 @@ void member_declaration_delete(struct member_declaration* owner opt p)
}
}
struct member_declaration* owner member_declaration(struct parser_ctx* ctx,
const struct struct_or_union_specifier* p_struct_or_union_specifier)
struct struct_or_union_specifier* p_struct_or_union_specifier)
{
struct member_declaration* owner p_member_declaration = calloc(1, sizeof(struct member_declaration));
//attribute_specifier_sequence_opt specifier_qualifier_list member_declarator_list_opt ';'
Expand Down
3 changes: 2 additions & 1 deletion src/parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,8 @@ struct member_declaration

};

struct member_declaration* owner member_declaration(struct parser_ctx* ctx, const struct struct_or_union_specifier*);
struct member_declaration* owner member_declaration(struct parser_ctx* ctx,
struct struct_or_union_specifier*);
void member_declaration_delete(struct member_declaration* owner opt p);

struct member_declarator
Expand Down

0 comments on commit 972119e

Please sign in to comment.