talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 66d2176e8bbc847dfc498236173293472eb50aeb
parent aed88afd6410fbb6508b64628571ac8cb47f9690
Author: wwp <wwp@free.fr>
Date:   Tue, 27 Dec 2016 15:20:53 +0100

Silent up a compiler warning by making the ComposeCallAdvancedAction
enum a real integer-scope ([-1 .. n] instead of [0 .. n]), swallowing
the -1 value check.

Diffstat:
Msrc/compose.c | 7++++---
1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/compose.c b/src/compose.c @@ -122,7 +122,8 @@ enum typedef enum { - COMPOSE_CALL_ADVANCED_ACTION_MOVE_BEGINNING_OF_LINE, + COMPOSE_CALL_ADVANCED_ACTION_UNDEFINED = -1, + COMPOSE_CALL_ADVANCED_ACTION_MOVE_BEGINNING_OF_LINE = 0, COMPOSE_CALL_ADVANCED_ACTION_MOVE_FORWARD_CHARACTER, COMPOSE_CALL_ADVANCED_ACTION_MOVE_BACKWARD_CHARACTER, COMPOSE_CALL_ADVANCED_ACTION_MOVE_FORWARD_WORD, @@ -11059,14 +11060,14 @@ static ComposeCallAdvancedAction compose_call_advanced_action_from_path(GtkActio DO_ACTION("Edit/Advanced/DelForwWord", COMPOSE_CALL_ADVANCED_ACTION_DELETE_FORWARD_WORD); DO_ACTION("Edit/Advanced/DelLine", COMPOSE_CALL_ADVANCED_ACTION_DELETE_LINE); DO_ACTION("Edit/Advanced/DelEndLine", COMPOSE_CALL_ADVANCED_ACTION_DELETE_TO_LINE_END); - return -1; + return COMPOSE_CALL_ADVANCED_ACTION_UNDEFINED; } static void compose_advanced_action_cb(GtkAction *gaction, gpointer data) { Compose *compose = (Compose *)data; GtkTextView *text = GTK_TEXT_VIEW(compose->text); - ComposeCallAdvancedAction action = -1; + ComposeCallAdvancedAction action = COMPOSE_CALL_ADVANCED_ACTION_UNDEFINED; action = compose_call_advanced_action_from_path(gaction);