bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-wget] Clang analyze on Win32


From: Gisle Vanem
Subject: [Bug-wget] Clang analyze on Win32
Date: Wed, 17 Jun 2015 22:31:48 +0200
User-agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1

I'm trying to familiarize myself with clang and did a
quick 'clang-cl --analyze <MSVC-CFLAGS> <SOURCES>'. This is what
it revealed:

init.c(569,13) :  warning: Value stored to 'home' during its initialization is 
never read
     char *home = home_dir ();
            ^~~~   ~~~~~~~~~~~

Makes sense since since:
   char *home = home_dir ();  << line 569
   xfree (file);
   home = ws_mypath ();

Seems this last line should be dropped since home_dir() already
calls ws_mypath(). So I think this patch is in order:

--- a/init.c    2015-05-25 18:36:26 +0000
+++ b/init.c      2015-06-17 22:26:34 +0000
@@ -568,7 +568,6 @@
     {
       char *home = home_dir ();
       xfree (file);
-      home = ws_mypath ();
       if (home)
         {
           file = aprintf ("%s/wget.ini", home);

--
--gv



reply via email to

[Prev in Thread] Current Thread [Next in Thread]