mirror of https://github.com/schoebel/mars
copy: fix enum type checking
block/mars/kernel/mars_copy.c:466:2: warning: case label value is less than minimum value for type [-Wswitch-outside-range]
This commit is contained in:
parent
b9f666d257
commit
0615ab3a23
|
@ -434,8 +434,8 @@ int _next_state(struct copy_brick *brick, unsigned index, loff_t pos)
|
|||
struct mref_object *mref0;
|
||||
struct mref_object *mref1;
|
||||
struct copy_state *st;
|
||||
char state;
|
||||
char next_state;
|
||||
enum _copy_state state;
|
||||
enum _copy_state next_state;
|
||||
bool do_restart = false;
|
||||
int progress = 0;
|
||||
int status;
|
||||
|
|
|
@ -41,7 +41,7 @@ extern int mars_copy_write_max_fly;
|
|||
extern atomic_t global_copy_read_flight;
|
||||
extern atomic_t global_copy_write_flight;
|
||||
|
||||
enum {
|
||||
enum _copy_state {
|
||||
COPY_STATE_RESET = -1,
|
||||
COPY_STATE_START = 0, // don't change this, it _must_ be zero
|
||||
COPY_STATE_START2,
|
||||
|
@ -52,12 +52,12 @@ enum {
|
|||
COPY_STATE_WRITTEN,
|
||||
COPY_STATE_CLEANUP,
|
||||
COPY_STATE_FINISHED,
|
||||
};
|
||||
} __packed;
|
||||
|
||||
struct copy_state {
|
||||
struct mref_object *table[2];
|
||||
bool active[2];
|
||||
char state;
|
||||
enum _copy_state state;
|
||||
bool writeout;
|
||||
short prev;
|
||||
unsigned short len;
|
||||
|
|
Loading…
Reference in New Issue