diff options
author | 2009-12-23 13:33:23 +0000 | |
---|---|---|
committer | 2009-12-23 13:33:23 +0000 | |
commit | cb30255dcabb5ca4ac3da36b7556a9d54017247b (patch) | |
tree | cddb4ffca7c9ca3c7106f0b988ec67d9ca9a446f | |
parent | Invalid Manifest (diff) | |
download | overlay-cb30255dcabb5ca4ac3da36b7556a9d54017247b.tar.gz overlay-cb30255dcabb5ca4ac3da36b7556a9d54017247b.tar.bz2 overlay-cb30255dcabb5ca4ac3da36b7556a9d54017247b.zip |
Adding sparse-0.4.2, smatch-9999
svn path=/overlay/; revision=106
-rw-r--r-- | sys-devel/smatch/Manifest | 2 | ||||
-rw-r--r-- | sys-devel/smatch/files/smatch-fix-compiler-warnings.patch | 92 | ||||
-rw-r--r-- | sys-devel/smatch/smatch-9999.ebuild | 32 | ||||
-rw-r--r-- | sys-devel/sparse/Manifest | 2 | ||||
-rw-r--r-- | sys-devel/sparse/sparse-0.4.2.ebuild | 32 |
5 files changed, 160 insertions, 0 deletions
diff --git a/sys-devel/smatch/Manifest b/sys-devel/smatch/Manifest new file mode 100644 index 0000000..216c70d --- /dev/null +++ b/sys-devel/smatch/Manifest @@ -0,0 +1,2 @@ +AUX smatch-fix-compiler-warnings.patch 2958 RMD160 d938e64f3a249837378f7f2a3c6b732a587ec5e8 SHA1 e340164679a4bd763df767db64346871d9c7fda6 SHA256 e0dfcfabe0143a3f3b08405ca70ccbc791b673ab66dc36160798bc65c8481e02 +EBUILD smatch-9999.ebuild 651 RMD160 773d267485386623e927df47b13a09496ac47ef5 SHA1 539f47ce453190e82e56cb9fc4cb10dd632af7e0 SHA256 7c23559e6152c344376840fad609fc32447da130aeb9e2975b28ac52c686a0be diff --git a/sys-devel/smatch/files/smatch-fix-compiler-warnings.patch b/sys-devel/smatch/files/smatch-fix-compiler-warnings.patch new file mode 100644 index 0000000..e067703 --- /dev/null +++ b/sys-devel/smatch/files/smatch-fix-compiler-warnings.patch @@ -0,0 +1,92 @@ +diff --git a/check_locking.c b/check_locking.c +index 30a658d..595e422 100644 +--- a/check_locking.c ++++ b/check_locking.c +@@ -354,7 +354,7 @@ static void do_unlock(const char *name) + static void match_lock_held(const char *fn, struct expression *call_expr, + struct expression *assign_expr, void *_index) + { +- int index = (int)_index; ++ int index = *(int*)_index; + char *lock_name; + struct lock_info *lock = &lock_table[index]; + +@@ -376,7 +376,7 @@ static void match_lock_held(const char *fn, struct expression *call_expr, + static void match_lock_failed(const char *fn, struct expression *call_expr, + struct expression *assign_expr, void *_index) + { +- int index = (int)_index; ++ int index = *(int*)_index; + char *lock_name; + struct lock_info *lock = &lock_table[index]; + +@@ -399,7 +399,7 @@ static void match_returns_locked(const char *fn, struct expression *expr, + void *_index) + { + char *full_name = NULL; +- int index = (int)_index; ++ int index = *(int*)_index; + struct lock_info *lock = &lock_table[index]; + + if (lock->arg != RETURN_VAL) +@@ -411,7 +411,7 @@ static void match_returns_locked(const char *fn, struct expression *expr, + static void match_lock_unlock(const char *fn, struct expression *expr, void *_index) + { + char *full_name = NULL; +- int index = (int)_index; ++ int index = *(int*)_index; + struct lock_info *lock = &lock_table[index]; + + full_name = get_full_name(expr, index); +@@ -624,7 +624,7 @@ static void match_func_end(struct symbol *sym) + static void register_lock(int index) + { + struct lock_info *lock = &lock_table[index]; +- void *idx = (void *)index; ++ void *idx = &index; + + if (lock->return_type == ret_non_zero) { + return_implies_state(lock->function, 1, POINTER_MAX, &match_lock_held, idx); +@@ -649,7 +649,7 @@ static void load_table(struct lock_info *_lock_table, int size) + if (lock_table[i].action == LOCK) + register_lock(i); + else +- add_function_hook(lock_table[i].function, &match_lock_unlock, (void *)i); ++ add_function_hook(lock_table[i].function, &match_lock_unlock, &i); + } + } + +diff --git a/check_unused_ret.c b/check_unused_ret.c +index 2f277c2..94afb66 100644 +--- a/check_unused_ret.c ++++ b/check_unused_ret.c +@@ -59,7 +59,7 @@ static struct smatch_state *my_alloc_state(int assign_id) + snprintf(buff, 255, "assign_%d", assign_id); + buff[255] = '\0'; + state->name = alloc_string(buff); +- state->data = (void *) assign_id; ++ state->data = &assign_id; + return state; + } + +@@ -122,7 +122,7 @@ static void delete_used_symbols(struct state_list *possible) + struct sm_state *tmp; + + FOR_EACH_PTR(possible, tmp) { +- delete_used((int)tmp->state->data); ++ delete_used(*(int*)tmp->state->data); + } END_FOR_EACH_PTR(tmp); + } + +diff --git a/smatch_extra.c b/smatch_extra.c +index 45e8bf7..c094be6 100644 +--- a/smatch_extra.c ++++ b/smatch_extra.c +@@ -12,7 +12,6 @@ + */ + + #include <stdlib.h> +-#define __USE_ISOC99 + #include <limits.h> + #include "parse.h" + #include "smatch.h" diff --git a/sys-devel/smatch/smatch-9999.ebuild b/sys-devel/smatch/smatch-9999.ebuild new file mode 100644 index 0000000..0e8421d --- /dev/null +++ b/sys-devel/smatch/smatch-9999.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit autotools +inherit git + +DESCRIPTION="Static analysis for C" +HOMEPAGE="http://repo.or.cz/w/smatch.git" +EGIT_REPO_URI="git://repo.or.cz/smatch.git" + +KEYWORDS="" + +LICENSE="OSL-1.1" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="!sys-devel/sparse" + +src_compile() { + sed -i \ + -e '/^PREFIX=/s:=.*:=/usr:' \ + -e "/^LIBDIR=/s:/lib:/$(get_libdir):" \ + Makefile || die + epatch "${FILESDIR}/${PN}-fix-compiler-warnings.patch" +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + dodoc FAQ README README-smatch +} diff --git a/sys-devel/sparse/Manifest b/sys-devel/sparse/Manifest new file mode 100644 index 0000000..d62feb9 --- /dev/null +++ b/sys-devel/sparse/Manifest @@ -0,0 +1,2 @@ +DIST sparse-0.4.2.tar.gz 212444 RMD160 fe6ff7c4443fd64adc39c3db8ad7ba35ab71b3cc SHA1 a2adef3f78c7409e8c0bb80941f473d775afcac4 SHA256 62958148bbc2b2753b54c70b746ab75bbdabda913619a7f4fbc223d1ecb8addd +EBUILD sparse-0.4.2.ebuild 758 RMD160 6f2f32bc87bf30012fa699b77afb39000081261c SHA1 9d19a4f8cac4dd4346687de54ce5c5c20d8035c3 SHA256 5177da86749197083afc3a853733c6d07acfceda75adbd2691355e90de9adacf diff --git a/sys-devel/sparse/sparse-0.4.2.ebuild b/sys-devel/sparse/sparse-0.4.2.ebuild new file mode 100644 index 0000000..0219267 --- /dev/null +++ b/sys-devel/sparse/sparse-0.4.2.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2009 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils multilib flag-o-matic + +DESCRIPTION="C semantic parser" +HOMEPAGE="http://kernel.org/pub/linux/kernel/people/josh/sparse/" +SRC_URI="http://kernel.org/pub/linux/kernel/people/josh/sparse/dist/${P}.tar.gz" + +LICENSE="OSL-1.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" +IUSE="" + +DEPEND="" +RDEPEND="!sys-devel/smatch" + +src_unpack() { + unpack ${A} + cd "${S}" + sed -i \ + -e '/^PREFIX=/s:=.*:=/usr:' \ + -e "/^LIBDIR=/s:/lib:/$(get_libdir):" \ + Makefile || die + append-flags -fno-strict-aliasing +} + +src_install() { + emake DESTDIR="${D}" install || die "make install failed" + dodoc FAQ README +} |