[libsoup] Add unused-result attribute to soup_session_send() It is easy to use this API while ignoring the res



commit bea28c620528101eca62f65c0c6f200d7f8432be
Author: Patrick Griffis <pgriffis igalia com>
Date:   Tue Dec 8 14:01:57 2020 -0600

    Add unused-result attribute to soup_session_send()
    It is easy to use this API while ignoring the result which could
    lead to leaks

 libsoup/soup-session.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/libsoup/soup-session.h b/libsoup/soup-session.h
index e3ea56a3..4d4717b5 100644
--- a/libsoup/soup-session.h
+++ b/libsoup/soup-session.h
@@ -55,7 +55,7 @@ SOUP_AVAILABLE_IN_ALL
 GInputStream   *soup_session_send             (SoupSession           *session,
                                               SoupMessage           *msg,
                                               GCancellable          *cancellable,
-                                              GError               **error);
+                                              GError               **error) G_GNUC_WARN_UNUSED_RESULT;
 
 SOUP_AVAILABLE_IN_ALL
 void                soup_session_add_feature            (SoupSession        *session,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]