Skip to content

Commit

Permalink
fix build break on some compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
henrygab committed Jan 15, 2025
1 parent 0531946 commit 99e8de3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/src/cmdhfmf.c
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ static int initSectorTable(sector_t **src, size_t items) {
// } sector_t;

// This allocates based on the size of a single item
_Static_assert(sizeof(sector_t) >= 18); // if packed, would be 18
_Static_assert(sizeof(sector_t) == 24); // not packed, so each entry must be 24 bytes
_Static_assert(sizeof(sector_t) >= 18, "Unexpectedly small sector_t"); // if packed, would be 18
_Static_assert(sizeof(sector_t) == 24, "Sector_t used to be padded to 24 bytes?"); // not packed, so each entry must be 24 bytes

(*src) = calloc(items, sizeof(sector_t));
if (*src == NULL) {
Expand Down

0 comments on commit 99e8de3

Please sign in to comment.