Add old style wwarning to compile flags. Fix code accordingly
This commit is contained in:
parent
c5e697b366
commit
b102d90d33
@ -32,7 +32,7 @@ set(SOURCE
|
|||||||
${LAYER_SELECTOR_SOURCES}
|
${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_executable(${PROJECT_NAME} ${SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/resources/resources.c)
|
||||||
add_dependencies(${PROJECT_NAME} glib-resources)
|
add_dependencies(${PROJECT_NAME} glib-resources)
|
||||||
|
2
main.c
2
main.c
@ -117,7 +117,7 @@ static void app_about(GSimpleAction *action, GVariant *parameter, gpointer user_
|
|||||||
/**
|
/**
|
||||||
* @brief Contains the application menu entries
|
* @brief Contains the application menu entries
|
||||||
*/
|
*/
|
||||||
const static GActionEntry app_actions[] = {
|
static const GActionEntry app_actions[] = {
|
||||||
{"quit", app_quit, NULL, NULL, NULL, {0}},
|
{"quit", app_quit, NULL, NULL, NULL, {0}},
|
||||||
{"about", app_about, NULL, NULL, NULL, {0}}
|
{"about", app_about, NULL, NULL, NULL, {0}}
|
||||||
};
|
};
|
||||||
|
@ -183,10 +183,10 @@ static double convert_number_to_engineering(double input, const char **out_prefi
|
|||||||
const char *selected_prefix = NULL;
|
const char *selected_prefix = NULL;
|
||||||
double return_val = 0.0;
|
double return_val = 0.0;
|
||||||
int idx;
|
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 */
|
"", /* 1 */
|
||||||
"h", "k", "M", "G", "T", "P", "E", "Z", "Y"}; /* > 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,
|
1,
|
||||||
1E2, 1E3, 1E6, 1E9, 1E12, 1E15, 1E18, 1E21, 1E24};
|
1E2, 1E3, 1E6, 1E9, 1E12, 1E15, 1E18, 1E21, 1E24};
|
||||||
const int prefix_count = (int)(sizeof(prefixes)/sizeof(char *));
|
const int prefix_count = (int)(sizeof(prefixes)/sizeof(char *));
|
||||||
|
Loading…
Reference in New Issue
Block a user