This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/25810] spurious warning about unused function return



------- Comment #2 from wingo at pobox dot com  2006-01-16 15:07 -------
Just for clarity, here is the warning:

test.c: In function ?main?:
test.c:33: warning: value computed is not used

The line corresponding to 33 in the preprocessed file:

    (void*)data_ref((data*)d);

data_ref is not declared as pure or const. It seems to be the cast that is
causing the warning. The real-world case that causes this warning to be an
issue are things like this, from GStreamer:

#define gst_buffer_ref(buf) \
  GST_BUFFER_CAST (gst_mini_object_ref (GST_MINI_OBJECT (buf)))


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25810


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]