summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2017-02-24 16:25:24 +0000
committerjoe <joe@61a7d7f5-40b7-0310-9c16-bb0ea8cb1845>2017-02-24 16:25:24 +0000
commit97e8302ec403218e8206500df5ea1b197e4fa3c5 (patch)
tree20be4b805545bb6df7cb0d56f608d5d0d7eed5de
parent917d6e4981d1f7c1bfa241268a7dc8c15bee259b (diff)
downloadneon-97e8302ec403218e8206500df5ea1b197e4fa3c5.tar.gz
* src/ne_request.h: Add GCC nonnull attribute for ne_request *
arguments in a few places. git-svn-id: http://svn.webdav.org/repos/projects/neon/trunk@1994 61a7d7f5-40b7-0310-9c16-bb0ea8cb1845
-rw-r--r--src/ne_request.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/ne_request.h b/src/ne_request.h
index be6f3a1..a0d5b73 100644
--- a/src/ne_request.h
+++ b/src/ne_request.h
@@ -48,16 +48,19 @@ typedef struct ne_request_s ne_request;
* 'path' must conform to the 'abs_path' grammar in RFC2396, with an
* optional "? query" part, and MUST be URI-escaped by the caller. */
ne_request *ne_request_create(ne_session *sess,
- const char *method, const char *path);
+ const char *method, const char *path)
+ ne_attribute((nonnull));
/* The request body will be taken from 'size' bytes of 'buffer'. */
void ne_set_request_body_buffer(ne_request *req, const char *buffer,
- size_t size);
+ size_t size)
+ ne_attribute((nonnull));
/* The request body will be taken from 'length' bytes read from the
* file descriptor 'fd', starting from file offset 'offset'. */
void ne_set_request_body_fd(ne_request *req, int fd,
- ne_off_t offset, ne_off_t length);
+ ne_off_t offset, ne_off_t length)
+ ne_attribute((nonnull));
/* "Pull"-based request body provider: a callback which is invoked to
* provide blocks of request body on demand.
@@ -82,7 +85,8 @@ typedef ssize_t (*ne_provide_body)(void *userdata,
* total size of the request is unknown by the caller and chunked
* tranfer will be used. */
void ne_set_request_body_provider(ne_request *req, ne_off_t length,
- ne_provide_body provider, void *userdata);
+ ne_provide_body provider, void *userdata)
+ ne_attribute((nonnull (1)));
/* Handling response bodies; two callbacks must be provided:
*