Skip to content

Commit

Permalink
Remove hacks now that exit() is noreturn
Browse files Browse the repository at this point in the history
  • Loading branch information
ccoffing committed Jan 9, 2024
1 parent 239d5a8 commit 729ea23
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions elkscmd/disk_utils/mkfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,7 @@
#include <linuxmt/fs.h>
#include <linuxmt/minix_fs.h>

/* Check for gcc removed from here. */

#ifndef __linux__
#define volatile
#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif

Expand Down Expand Up @@ -152,12 +149,7 @@ unsigned char test_bit(unsigned int nr, void * add)
#define mark_zone(x) (setbit(zone_map,(x)-FIRSTZONE+1))
#define unmark_zone(x) (clrbit(zone_map,(x)-FIRSTZONE+1))

/*
* Volatile to let gcc know that this doesn't return. When trying
* to compile this under minix, volatile gives a warning, as
* exit() isn't defined as volatile under minix.
*/
volatile void fatal_error(const char * fmt_string,int status)
void fatal_error(const char * fmt_string,int status)
{
printf(fmt_string);
exit(status);
Expand Down

0 comments on commit 729ea23

Please sign in to comment.