From 97e8302ec403218e8206500df5ea1b197e4fa3c5 Mon Sep 17 00:00:00 2001 From: joe Date: Fri, 24 Feb 2017 16:25:24 +0000 Subject: * 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 --- src/ne_request.h | 12 ++++++++---- 1 file 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: * -- cgit v1.2.1