All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix warnings from gcc 4.1.1
@ 2006-07-08  6:00 Pavel Roskin
  2006-07-08 18:14 ` Linus Torvalds
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Roskin @ 2006-07-08  6:00 UTC (permalink / raw)
  To: linux-sparse

From: Pavel Roskin <proski@gnu.org>

These warnings are reported for every file:
lib.h: In function 'add_symbol':
lib.h:171: warning: value computed is not used
lib.h: In function 'add_statement':
lib.h:176: warning: value computed is not used
lib.h: In function 'add_expression':
lib.h:181: warning: value computed is not used

That's the way new versions of gcc warn about values that are cast to a
type but not used.

The cast in add_ptr_list_tag() is not really needed.  Its return value
is used only in one place (add_pseudo) where it's converted to (void *)
anyway.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---

 ptrlist.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/ptrlist.h b/ptrlist.h
index b42a0ca..7a786cb 100644
--- a/ptrlist.h
+++ b/ptrlist.h
@@ -46,7 +46,7 @@ extern int linearize_ptr_list(struct ptr
  * extensions..
  */
 #define add_ptr_list_tag(list,entry,tag) \
-	(TYPEOF(*(list))) (CHECK_TYPE(*(list),(entry)),__add_ptr_list((struct ptr_list **)(list), (entry), (tag)))
+	(CHECK_TYPE(*(list),(entry)),__add_ptr_list((struct ptr_list **)(list), (entry), (tag)))
 #define add_ptr_list(list,entry) \
 	add_ptr_list_tag(list,entry,0)
 #define free_ptr_list(list) \

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-07-11  7:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-07-08  6:00 [PATCH] Fix warnings from gcc 4.1.1 Pavel Roskin
2006-07-08 18:14 ` Linus Torvalds
2006-07-08 20:28   ` Linus Torvalds
2006-07-09  6:31   ` Pavel Roskin
2006-07-10 19:13     ` Morten Welinder
2006-07-11  7:03       ` Pavel Roskin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.