Commit 2eb59b51 authored by Dafydd Harries's avatar Dafydd Harries
Browse files

STUN: warn about unused results from various functions

darcs-hash:20070126091150-c9803-ca551c782cbea292f127c06fd01af226edd40c82.gz
parent 7111a6fe
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <arpa/inet.h> #include <arpa/inet.h>
#include <string.h> #include <string.h>
G_GNUC_WARN_UNUSED_RESULT
static StunAttribute * static StunAttribute *
stun_attribute_new (guint type) stun_attribute_new (guint type)
{ {
...@@ -32,6 +33,7 @@ stun_attribute_free (StunAttribute *attr) ...@@ -32,6 +33,7 @@ stun_attribute_free (StunAttribute *attr)
g_slice_free (StunAttribute, attr); g_slice_free (StunAttribute, attr);
} }
G_GNUC_WARN_UNUSED_RESULT
static gboolean static gboolean
_stun_attribute_unpack (StunAttribute *attr, guint length, const gchar *s) _stun_attribute_unpack (StunAttribute *attr, guint length, const gchar *s)
{ {
......
...@@ -48,29 +48,38 @@ struct _StunMessage { ...@@ -48,29 +48,38 @@ struct _StunMessage {
StunAttribute **attributes; StunAttribute **attributes;
}; };
G_GNUC_WARN_UNUSED_RESULT
StunAttribute * StunAttribute *
stun_attribute_mapped_address_new (guint32 ip_address, guint16 port); stun_attribute_mapped_address_new (guint32 ip_address, guint16 port);
void void
stun_attribute_free (StunAttribute *attr); stun_attribute_free (StunAttribute *attr);
G_GNUC_WARN_UNUSED_RESULT
guint guint
stun_attribute_pack (StunAttribute *attr, gchar **ret); stun_attribute_pack (StunAttribute *attr, gchar **ret);
G_GNUC_WARN_UNUSED_RESULT
gchar * gchar *
stun_attribute_dump (StunAttribute *attr); stun_attribute_dump (StunAttribute *attr);
G_GNUC_WARN_UNUSED_RESULT
StunAttribute * StunAttribute *
stun_attribute_unpack (guint length, const gchar *s); stun_attribute_unpack (guint length, const gchar *s);
void void
stun_message_init (StunMessage *msg, guint type); stun_message_init (StunMessage *msg, guint type);
G_GNUC_WARN_UNUSED_RESULT
StunMessage * StunMessage *
stun_message_new (guint type); stun_message_new (guint type);
G_GNUC_WARN_UNUSED_RESULT
StunMessage * StunMessage *
stun_message_binding_request_new (void); stun_message_binding_request_new (void);
void void
stun_message_free (StunMessage *msg); stun_message_free (StunMessage *msg);
G_GNUC_WARN_UNUSED_RESULT
guint guint
stun_message_pack (StunMessage *msg, gchar **packed); stun_message_pack (StunMessage *msg, gchar **packed);
G_GNUC_WARN_UNUSED_RESULT
gchar * gchar *
stun_message_dump (StunMessage *msg); stun_message_dump (StunMessage *msg);
G_GNUC_WARN_UNUSED_RESULT
StunMessage * StunMessage *
stun_message_unpack (guint length, gchar *s); stun_message_unpack (guint length, gchar *s);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment