Skip to content

Commit

Permalink
gcc: Fix gcc warnings when compiling on > -O2
Browse files Browse the repository at this point in the history
Signed-off-by: Pantelis Antoniou <[email protected]>
  • Loading branch information
pantoniou committed Sep 30, 2024
1 parent fa02ddf commit 997b480
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/allocator/fy-allocator-mremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,8 @@ static int fy_mremap_get_tag(struct fy_allocator *a)
goto err_out;

mrt = fy_mremap_tag_from_tag(mra, id);
assert(mrt);
if (!mrt)
goto err_out;

fy_mremap_tag_setup(mra, mrt);

Expand Down
4 changes: 4 additions & 0 deletions src/lib/fy-diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,10 @@ void fy_diag_error_atom_display(struct fy_diag *diag, enum fy_error_type type, s

fy_diag_get_error_colors(diag, type, &color_start, &color_end, &white);

/* pacify compilers that think these are uninitialized */
cols = 0;
rowbufsz = 0;

/* two passes, first one collects extents */

start_col = -1;
Expand Down

0 comments on commit 997b480

Please sign in to comment.