OSDN Git Service

tests: enable a few syntax-checks
authorJim Meyering <meyering@redhat.com>
Tue, 29 Sep 2009 14:46:16 +0000 (16:46 +0200)
committerJim Meyering <meyering@redhat.com>
Tue, 29 Sep 2009 14:46:16 +0000 (16:46 +0200)
* cfg.mk (local-checks-to-skip): Remove a few useless exclusions
and enable a few syntax checks.
* libparted/arch/linux.c (linux_destroy): Avoid triggering the
sc_cast_of_argument_to_free check.
* parted/strlist.c (str_list_destroy_node): Likewise.

cfg.mk
libparted/arch/linux.c
parted/strlist.c

diff --git a/cfg.mk b/cfg.mk
index 9ed498e..cf34ad4 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -41,12 +41,7 @@ local-checks-to-skip = \
   sc_space_tab \
   sc_tight_scope \
   sc_useless_cpp_parens \
-  changelog-check \
-  strftime-check \
-  patch-check \
-  author_mark_check \
-  sc_cast_of_argument_to_free \
-  check-AUTHORS
+  changelog-check
 
 # Now that we have better (check.mk) tests, make this the default.
 export VERBOSE = yes
index 6d38ab3..52c31e2 100644 (file)
@@ -1337,7 +1337,8 @@ error:
 static void
 linux_destroy (PedDevice* dev)
 {
-        free (((LinuxSpecific*)dev->arch_specific)->dmtype);
+        void *p = ((LinuxSpecific*)dev->arch_specific)->dmtype;
+        free (p);
         free (dev->arch_specific);
         free (dev->path);
         free (dev->model);
index cc4b65c..60daf7a 100644 (file)
@@ -226,7 +226,8 @@ str_list_destroy (StrList* list)
 void
 str_list_destroy_node (StrList* list)
 {
-       free ((wchar_t*) list->str);
+       void *p = (char *) (list->str); /* discard const */
+       free (p);
        free (list);
 }