diff --git a/CMakeLists.txt b/CMakeLists.txt index 6bc2ece..9476ce8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,7 +32,7 @@ set(SOURCE ${LAYER_SELECTOR_SOURCES} ) -add_compile_options(-Wall) +add_compile_options(-Wall -Wold-style-declaration) add_executable(${PROJECT_NAME} ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/resources/resources.c) add_dependencies(${PROJECT_NAME} glib-resources) diff --git a/main.c b/main.c index b0b8471..3e27d89 100644 --- a/main.c +++ b/main.c @@ -117,7 +117,7 @@ static void app_about(GSimpleAction *action, GVariant *parameter, gpointer user_ /** * @brief Contains the application menu entries */ -const static GActionEntry app_actions[] = { +static const GActionEntry app_actions[] = { {"quit", app_quit, NULL, NULL, NULL, {0}}, {"about", app_about, NULL, NULL, NULL, {0}} }; diff --git a/widgets/conv-settings-dialog.c b/widgets/conv-settings-dialog.c index c09400e..538f4dc 100644 --- a/widgets/conv-settings-dialog.c +++ b/widgets/conv-settings-dialog.c @@ -183,10 +183,10 @@ static double convert_number_to_engineering(double input, const char **out_prefi const char *selected_prefix = NULL; double return_val = 0.0; int idx; - const static char * prefixes[] = {"y", "z", "a", "f", "p", "n", "u", "m", "c", "d", /* < 1 */ + static const char * prefixes[] = {"y", "z", "a", "f", "p", "n", "u", "m", "c", "d", /* < 1 */ "", /* 1 */ "h", "k", "M", "G", "T", "P", "E", "Z", "Y"}; /* > 1 */ - const static double scale[] = {1E-24, 1E-21, 1E-18, 1E-15, 1E-12, 1E-9, 1E-6, 1E-3, 1E-2, 1E-1, + static const double scale[] = {1E-24, 1E-21, 1E-18, 1E-15, 1E-12, 1E-9, 1E-6, 1E-3, 1E-2, 1E-1, 1, 1E2, 1E3, 1E6, 1E9, 1E12, 1E15, 1E18, 1E21, 1E24}; const int prefix_count = (int)(sizeof(prefixes)/sizeof(char *));