From 06b48ccf8367ab4433fd7e0b3bcd26afb635ff92 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sun, 31 Oct 2010 18:22:10 +0100 Subject: [PATCH] Add 2 "return" to make C static analyzer happy --- src/core/weechat.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/weechat.c b/src/core/weechat.c index 28ae487b5..322558ffd 100644 --- a/src/core/weechat.c +++ b/src/core/weechat.c @@ -251,6 +251,8 @@ weechat_create_home_dirs () string_iconv_fprintf (stderr, _("Error: unable to get HOME directory\n")); weechat_shutdown (EXIT_FAILURE, 0); + /* make C static analyzer happy (never executed) */ + return; } dir_length = strlen (ptr_home) + 10; weechat_home = malloc (dir_length); @@ -260,6 +262,8 @@ weechat_create_home_dirs () _("Error: not enough memory for home " "directory\n")); weechat_shutdown (EXIT_FAILURE, 0); + /* make C static analyzer happy (never executed) */ + return; } snprintf (weechat_home, dir_length, "%s%s.weechat", ptr_home, DIR_SEPARATOR);