diff --git a/cocci-cast.diff b/cocci-cast.diff new file mode 100644 index 0000000..8452702 --- /dev/null +++ b/cocci-cast.diff @@ -0,0 +1,21 @@ +Work around compiler warning + +pycaml_ml.c: In function 'pymodule_initmodule': +pycaml_ml.c:1441: warning: assignment makes pointer from integer without a cast +--- + pycaml/pycaml_ml.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +Index: coccinelle-0.2.2/pycaml/pycaml_ml.c +=================================================================== +--- coccinelle-0.2.2.orig/pycaml/pycaml_ml.c ++++ coccinelle-0.2.2/pycaml/pycaml_ml.c +@@ -1438,7 +1438,7 @@ value pymodule_initmodule( value name, v + for( i = 0; i < Wosize_val(funclist); i++ ) { + item = Field(funclist,i); + methods[i].ml_name = String_val(Field(item,0)); +- methods[i].ml_meth = pywrap_closure(Field(item,1)); ++ methods[i].ml_meth = (void *)(long)pywrap_closure(Field(item,1)); + methods[i].ml_flags = Int_val(Field(item,2)); + methods[i].ml_doc = String_val(Field(item,3)); + } diff --git a/coccinelle.spec b/coccinelle.spec index cecbd81..d54eb64 100644 --- a/coccinelle.spec +++ b/coccinelle.spec @@ -1,6 +1,6 @@ Name: coccinelle Version: 0.2.2 -Release: jen1 +Release: 0 Summary: Semantic patch utility License: GPL2 Group: Productivity/Text/Utilities @@ -9,6 +9,7 @@ URL: http://coccinelle.lip6.fr/ Source: %{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: ncurses-devel ocaml python-devel +Patch1: cocci-cast.diff %description Coccinelle is a program matching and transformation engine which @@ -24,6 +25,7 @@ used (by us and others) for finding and fixing bugs in systems code. %prep %setup -q +%patch -P 1 -p1 %build # not autotools configure, don't use macro