Fix all warnings and enable -Werror

mostly unused variables and broken indentation.
This commit is contained in:
Adrien Destugues
2017-05-06 15:13:50 +02:00
parent c0e625fdef
commit 5b6095f0bc
14 changed files with 56 additions and 95 deletions

View File

@@ -322,6 +322,10 @@ void Set_pixel_24b(T_IO_Context *context, short x_pos, short y_pos, byte r, byte
context->Preview_bitmap[x_pos/context->Preview_factor_X + (y_pos/context->Preview_factor_Y)*PREVIEW_WIDTH*Menu_factor_X]=color;
}
break;
case CONTEXT_PALETTE:
// In a palette, there are no pixels!
break;
}
}
@@ -514,6 +518,10 @@ void Pre_load(T_IO_Context *context, short width, short height, long file_size,
//context->Pitch = context->Surface->pitch;
//context->Target_address = context->Surface->pixels;
break;
case CONTEXT_PALETTE:
// In a palette, there are no pixels!
break;
}
if (File_error)
@@ -546,6 +554,10 @@ void Pre_load(T_IO_Context *context, short width, short height, long file_size,
// Load palette
Set_palette_fake_24b(context->Palette);
break;
case CONTEXT_PALETTE:
// In a palette, there are no pixels!
break;
}
}
}
@@ -695,6 +707,10 @@ void Load_image(T_IO_Context *context)
File_error=1;
break;
case CONTEXT_PALETTE:
// In a palette, there are no pixels!
break;
}
}
free(context->Buffer_image_24b);
@@ -1031,6 +1047,10 @@ void Save_image(T_IO_Context *context)
case CONTEXT_SURFACE:
break;
case CONTEXT_PALETTE:
// In a palette, there are no pixels!
break;
}
format = Get_fileformat(context->Format);