]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
global: Change CALLBACK_TYPECHECK() to used with subtraction
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Thu, 9 May 2019 12:29:34 +0000 (15:29 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 13 May 2019 09:32:41 +0000 (12:32 +0300)
This is because clang's -Wstring-plus-int gave warnings when using
"string" + CALLBACK_TYPECHECK(), but there are no warnings when using
"string" - CALLBACK_TYPECHECK(). It would have been enough to change
only the string parameters to use "-", but for consistency this commit
changes all of them.

36 files changed:
src/auth/db-oauth2.h
src/imap/imap-fetch.h
src/lib-dns/dns-lookup.h
src/lib-http/http-client.h
src/lib-http/http-server.h
src/lib-ldap/ldap-client.h
src/lib-mail/istream-header-filter.h
src/lib-mail/message-header-parser.h
src/lib-mail/message-parser.h
src/lib-oauth2/oauth2.h
src/lib-program-client/program-client.h
src/lib-settings/settings.h
src/lib-smtp/smtp-client-command.h
src/lib-smtp/smtp-client-transaction.h
src/lib-smtp/smtp-server-private.h
src/lib-smtp/smtp-server.h
src/lib-smtp/smtp-submit.h
src/lib-sql/sql-api.h
src/lib-storage/index/maildir/maildir-storage.h
src/lib-storage/mail-search-mime.h
src/lib-storage/mail-search.h
src/lib-storage/mail-storage.h
src/lib-storage/mailbox-list-notify.h
src/lib/array.h
src/lib/bsearch-insert-pos.h
src/lib/child-wait.h
src/lib/ioloop.h
src/lib/iostream-proxy.h
src/lib/iostream-pump.h
src/lib/istream-sized.h
src/lib/istream.h
src/lib/lib-event.h
src/lib/log-throttle.h
src/lib/memarea.h
src/lib/ostream.h
src/lib/sort.h

index 9386b70fd15976e7da337ef591b96d89ae86e277..cb653dbd051e988f65a4186c406c51966922e22e 100644 (file)
@@ -39,7 +39,7 @@ bool db_oauth2_uses_password_grant(const struct db_oauth2 *db);
 
 void db_oauth2_lookup(struct db_oauth2 *db, struct db_oauth2_request *req, const char *token, struct auth_request *request, db_oauth2_lookup_callback_t *callback, void *context);
 #define db_oauth2_lookup(db, req, token, request, callback, context) \
-       db_oauth2_lookup(db, req, token + \
+       db_oauth2_lookup(db, req, token - \
                CALLBACK_TYPECHECK(callback, void(*)(struct db_oauth2_request *, enum passdb_result, const char*, typeof(context))), \
                request, (db_oauth2_lookup_callback_t*)callback, (void*)context)
 
index 7f394fd12911ccf7a5ce8951460093e1862f5d20..4453529c7b6b1d7a01b8b28f709b268c51d51566 100644 (file)
@@ -113,7 +113,7 @@ void imap_fetch_add_handler(struct imap_fetch_init_context *ctx,
                            imap_fetch_handler_t *handler, void *context)
        ATTR_NULL(3, 5);
 #define imap_fetch_add_handler(ctx, flags, nil_reply, handler, context) \
-         imap_fetch_add_handler(ctx, flags, nil_reply + \
+         imap_fetch_add_handler(ctx, flags, nil_reply - \
                CALLBACK_TYPECHECK(handler, int (*)( \
                        struct imap_fetch_context *, struct mail *, \
                        typeof(context))), \
index c11d05fc85dc7c4197279e6912d870ac24538658..38d65f65b94a84b81b23e9766bfa828dda5e8512 100644 (file)
@@ -44,7 +44,7 @@ int dns_lookup(const char *host, const struct dns_lookup_settings *set,
               dns_lookup_callback_t *callback, void *context,
               struct dns_lookup **lookup_r) ATTR_NULL(4);
 #define dns_lookup(host, set, callback, context, lookup_r) \
-       dns_lookup(host + \
+       dns_lookup(host - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct dns_lookup_result *, typeof(context))), \
                set, (dns_lookup_callback_t *)callback, context, lookup_r)
@@ -53,7 +53,7 @@ int dns_lookup_ptr(const struct ip_addr *ip,
                   dns_lookup_callback_t *callback, void *context,
                   struct dns_lookup **lookup_r) ATTR_NULL(4);
 #define dns_lookup_ptr(host, set, callback, context, lookup_r) \
-       dns_lookup_ptr(host + \
+       dns_lookup_ptr(host - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct dns_lookup_result *, typeof(context))), \
                set, (dns_lookup_callback_t *)callback, context, lookup_r)
@@ -72,7 +72,7 @@ int dns_client_lookup(struct dns_client *client, const char *host,
                      dns_lookup_callback_t *callback, void *context,
                      struct dns_lookup **lookup_r) ATTR_NULL(4);
 #define dns_client_lookup(client, host, callback, context, lookup_r) \
-       dns_client_lookup(client, host + \
+       dns_client_lookup(client, host - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct dns_lookup_result *, typeof(context))), \
                (dns_lookup_callback_t *)callback, context, lookup_r)
@@ -80,7 +80,7 @@ int dns_client_lookup_ptr(struct dns_client *client, const struct ip_addr *ip,
                          dns_lookup_callback_t *callback, void *context,
                          struct dns_lookup **lookup_r) ATTR_NULL(4);
 #define dns_client_lookup_ptr(client, host, callback, context, lookup_r) \
-       dns_client_lookup_ptr(client, host + \
+       dns_client_lookup_ptr(client, host - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct dns_lookup_result *, typeof(context))), \
                (dns_lookup_callback_t *)callback, context, lookup_r)
index e77c4f85a4bdca4030c17957ae7a47a71732c161..bc678aa0e85457361dfa0ac7698afeee4be27d2b 100644 (file)
@@ -223,7 +223,7 @@ http_client_request(struct http_client *client,
                    const char *method, const char *host, const char *target,
                    http_client_request_callback_t *callback, void *context);
 #define http_client_request(client, method, host, target, callback, context) \
-       http_client_request(client, method, host, target + \
+       http_client_request(client, method, host, target - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct http_response *response, typeof(context))), \
                (http_client_request_callback_t *)callback, context)
@@ -235,7 +235,7 @@ http_client_request_url(struct http_client *client,
                    const char *method, const struct http_url *target_url,
                    http_client_request_callback_t *callback, void *context);
 #define http_client_request_url(client, method, target_url, callback, context) \
-       http_client_request_url(client, method, target_url + \
+       http_client_request_url(client, method, target_url - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct http_response *response, typeof(context))), \
                (http_client_request_callback_t *)callback, context)
@@ -244,7 +244,7 @@ http_client_request_url_str(struct http_client *client,
                    const char *method, const char *url_str,
                    http_client_request_callback_t *callback, void *context);
 #define http_client_request_url_str(client, method, url_str, callback, context) \
-       http_client_request_url_str(client, method, url_str + \
+       http_client_request_url_str(client, method, url_str - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct http_response *response, typeof(context))), \
                (http_client_request_callback_t *)callback, context)
@@ -260,7 +260,7 @@ http_client_request_connect(struct http_client *client,
                    http_client_request_callback_t *callback,
                    void *context);
 #define http_client_request_connect(client, host, port, callback, context) \
-       http_client_request_connect(client, host, port + \
+       http_client_request_connect(client, host, port - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct http_response *response, typeof(context))), \
                (http_client_request_callback_t *)callback, context)
@@ -273,7 +273,7 @@ http_client_request_connect_ip(struct http_client *client,
                    http_client_request_callback_t *callback,
                    void *context);
 #define http_client_request_connect_ip(client, ip, port, callback, context) \
-       http_client_request_connect_ip(client, ip, port + \
+       http_client_request_connect_ip(client, ip, port - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct http_response *response, typeof(context))), \
                (http_client_request_callback_t *)callback, context)
@@ -411,7 +411,7 @@ void http_client_request_set_destroy_callback(struct http_client_request *req,
                                              void (*callback)(void *),
                                              void *context);
 #define http_client_request_set_destroy_callback(req, callback, context) \
-        http_client_request_set_destroy_callback(req, (void(*)(void*))callback, context + \
+        http_client_request_set_destroy_callback(req, (void(*)(void*))callback, context - \
                 CALLBACK_TYPECHECK(callback, void (*)(typeof(context))))
 
 /* submits request and blocks until the provided payload is sent. Multiple
index 3fc45176ff9db34731bb65230bc18b6ea3bafc0e..84156803e20b720e9bf102d0118b074bde530398 100644 (file)
@@ -189,7 +189,7 @@ void http_server_request_forward_payload(struct http_server_request *req,
 #define http_server_request_forward_payload(req, \
                output, max_size, callback, context) \
        http_server_request_forward_payload(req, output, max_size, \
-               (void(*)(void*))callback, context + \
+               (void(*)(void*))callback, context - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))))
 /* Forward the incoming request payload to the provided buffer in the
    background. Behaves identical to http_server_request_forward_payload()
@@ -200,7 +200,7 @@ void http_server_request_buffer_payload(struct http_server_request *req,
 #define http_server_request_buffer_payload(req, \
                buffer, max_size, callback, context) \
        http_server_request_buffer_payload(req, buffer, max_size, \
-               (void(*)(void*))callback, context + \
+               (void(*)(void*))callback, context - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))))
 /* Handle the incoming request payload by calling the callback each time
    more data is available. Payload reading automatically finishes when the
@@ -211,7 +211,7 @@ void http_server_request_handle_payload(struct http_server_request *req,
        void (*callback)(void *context), void *context);
 #define http_server_request_handle_payload(req, callback, context) \
        http_server_request_handle_payload(req,\
-               (void(*)(void*))callback, context + \
+               (void(*)(void*))callback, context - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))))
 
 /* Get the authentication credentials provided in this request. Returns 0 if
@@ -260,7 +260,7 @@ void http_server_request_set_destroy_callback(struct http_server_request *req,
                                              void (*callback)(void *),
                                              void *context);
 #define http_server_request_set_destroy_callback(req, callback, context) \
-       http_server_request_set_destroy_callback(req, (void(*)(void*))callback, context + \
+       http_server_request_set_destroy_callback(req, (void(*)(void*))callback, context - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))))
 
 /*
index f0707c87fbe32e23350b1cf3f20f0086dfecdf19..1a231ddff2396fd1aeb6087ea1bb94b56e6e99bd 100644 (file)
@@ -70,7 +70,7 @@ void ldap_search_start(struct ldap_client *client,
                       ldap_result_callback_t *callback,
                       void *context);
 #define ldap_search_start(client, input, callback, context) \
-       ldap_search_start(client, input + \
+       ldap_search_start(client, input - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        struct ldap_result *, typeof(context))), \
                (ldap_result_callback_t *)callback, context)
@@ -88,7 +88,7 @@ void ldap_compare_start(struct ldap_client *client,
                        const struct ldap_compare_input *input,
                        ldap_result_callback_t *callback, void *context);
 #define ldap_compare_start(client, input, callback, context) \
-       ldap_compare_start(client, input + \
+       ldap_compare_start(client, input - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        struct ldap_result *, typeof(context))), \
                (ldap_result_callback_t *)callback, context)
index 6864d2c437ab7cca2193cca9147ece8a8000c2ab..7c5ca3652ba4e441d2967b03ab5b11e735c7ba72 100644 (file)
@@ -39,7 +39,7 @@ i_stream_create_header_filter(struct istream *input,
        ATTR_NULL(6);
 #define i_stream_create_header_filter(input, flags, headers, headers_count, \
                                        callback, context) \
-         i_stream_create_header_filter(input, flags, headers, headers_count + \
+         i_stream_create_header_filter(input, flags, headers, headers_count - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        struct header_filter_istream *, \
                        struct message_header_line *, bool *, typeof(context))), \
index 3f3d24d44cdd7ad87166e34c7904bd5dafac2528..4a3415470e4aca04c84d1644d0e926501b234b87 100644 (file)
@@ -64,7 +64,7 @@ void message_parse_header(struct istream *input, struct message_size *hdr_size,
                          message_header_callback_t *callback, void *context)
        ATTR_NULL(2);
 #define message_parse_header(input, hdr_size, flags, callback, context) \
-         message_parse_header(input, hdr_size, flags + \
+         message_parse_header(input, hdr_size, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        struct message_header_line *hdr, typeof(context))), \
                (message_header_callback_t *)callback, context)
index c6fa79ce32f55f662031d632fc870c7ee2e9d8af..3efd8518629996c14aab1a391305161aaf734cf4 100644 (file)
@@ -77,7 +77,7 @@ void message_parser_parse_header(struct message_parser_ctx *ctx,
                                 message_part_header_callback_t *callback,
                                 void *context) ATTR_NULL(4);
 #define message_parser_parse_header(ctx, hdr_size, callback, context) \
-         message_parser_parse_header(ctx, hdr_size + \
+         message_parser_parse_header(ctx, hdr_size - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        struct message_part *, \
                        struct message_header_line *, typeof(context))), \
@@ -92,7 +92,7 @@ void message_parser_parse_body(struct message_parser_ctx *ctx,
 #define message_parser_parse_body(ctx, callback, context) \
          message_parser_parse_body(ctx, \
                (message_part_header_callback_t *)callback, \
-               (void *)((uintptr_t)context + CALLBACK_TYPECHECK(callback, \
+               (void *)((uintptr_t)context - CALLBACK_TYPECHECK(callback, \
                        void (*)(struct message_part *, \
                                struct message_header_line *, typeof(context)))))
 
index d80c81125c4312562579c35843d52b9284ac04a8..b6f58761392478e12cb5d2d184a27a2f1809d216 100644 (file)
@@ -74,7 +74,7 @@ oauth2_passwd_grant_start(const struct oauth2_settings *set,
                          oauth2_request_callback_t *callback,
                          void *context);
 #define oauth2_passwd_grant_start(set, input, username, password, callback, context) \
-       oauth2_passwd_grant_start(set, input + \
+       oauth2_passwd_grant_start(set, input - \
                CALLBACK_TYPECHECK(callback, void(*)(struct oauth2_request_result*, typeof(context))), \
                username, password, \
                (oauth2_request_callback_t*)callback, (void*)context);
@@ -85,7 +85,7 @@ oauth2_token_validation_start(const struct oauth2_settings *set,
                              oauth2_request_callback_t *callback,
                              void *context);
 #define oauth2_token_validation_start(set, input, callback, context) \
-       oauth2_token_validation_start(set, input + \
+       oauth2_token_validation_start(set, input - \
                CALLBACK_TYPECHECK(callback, void(*)(struct oauth2_request_result*, typeof(context))), \
                (oauth2_request_callback_t*)callback, (void*)context);
 
@@ -95,7 +95,7 @@ oauth2_introspection_start(const struct oauth2_settings *set,
                           oauth2_request_callback_t *callback,
                           void *context);
 #define oauth2_introspection_start(set, input, callback, context) \
-       oauth2_introspection_start(set, input + \
+       oauth2_introspection_start(set, input - \
                CALLBACK_TYPECHECK(callback, void(*)(struct oauth2_request_result*, typeof(context))), \
                (oauth2_request_callback_t*)callback, (void*)context);
 
@@ -105,7 +105,7 @@ oauth2_refresh_start(const struct oauth2_settings *set,
                     oauth2_request_callback_t *callback,
                     void *context);
 #define oauth2_refresh_start(set, input, callback, context) \
-       oauth2_refresh_start(set, input + \
+       oauth2_refresh_start(set, input - \
                CALLBACK_TYPECHECK(callback, void(*)(struct oauth2_request_result*, typeof(context))), \
                (oauth2_request_callback_t*)callback, (void*)context);
 
index 2020d13ae797c538602b4fe3c76a87a7f83af2dd..0083e437d4b3ac7cc6793a1de63f8236fef74567 100644 (file)
@@ -70,7 +70,7 @@ void program_client_switch_ioloop(struct program_client *pclient);
 void program_client_set_extra_fd(struct program_client *pclient, int fd,
         program_client_fd_callback_t * callback, void *context);
 #define program_client_set_extra_fd(pclient, fd, callback, context) \
-       program_client_set_extra_fd(pclient, fd + \
+       program_client_set_extra_fd(pclient, fd - \
                CALLBACK_TYPECHECK(callback, \
                        void (*)(typeof(context), struct istream *input)), \
                (program_client_fd_callback_t *)callback, context)
@@ -85,7 +85,7 @@ void program_client_run_async(struct program_client *pclient,
                              program_client_callback_t *, void*);
 #define program_client_run_async(pclient, callback, context) \
        program_client_run_async(pclient, (program_client_callback_t*)callback, \
-               (char*)context + CALLBACK_TYPECHECK(callback, \
+               (char*)context - CALLBACK_TYPECHECK(callback, \
                        void (*)(int, typeof(context))))
 
 #endif
index a5ee736d8f503a4a16cc1bc2556ff2dff156501b..05d9d941d11ff748ba9e4b95f6f77ac26b4b3cbb 100644 (file)
@@ -46,16 +46,16 @@ bool settings_read_i(const char *path, const char *section,
                     const char **error_r)
        ATTR_NULL(2, 4, 5);
 #define settings_read(path, section, callback, sect_callback, context, error_r) \
-         settings_read_i(path + \
+         settings_read_i(path - \
                CALLBACK_TYPECHECK(callback, const char *(*)( \
-                       const char *, const char *, typeof(context))) + \
+                       const char *, const char *, typeof(context))) - \
                CALLBACK_TYPECHECK(sect_callback, bool (*)( \
                        const char *, const char *, typeof(context), \
                        const char **)), \
                section, (settings_callback_t *)callback, \
                (settings_section_callback_t *)sect_callback, context, error_r)
 #define settings_read_nosection(path, callback, context, error_r) \
-         settings_read_i(path + \
+         settings_read_i(path - \
                CALLBACK_TYPECHECK(callback, const char *(*)( \
                        const char *, const char *, typeof(context))), \
                NULL, (settings_callback_t *)callback, NULL, context, error_r)
index 0df76f4f8d1ca2c8b0f0aa9995f599208459189f..e723bbb7810ae4aa0633a48e6055637fea8d1c0f 100644 (file)
@@ -39,7 +39,7 @@ smtp_client_command_new(struct smtp_client_connection *conn,
        enum smtp_client_command_flags flags,
        smtp_client_command_callback_t *callback, void *context);
 #define smtp_client_command_new(conn, flags, callback, context) \
-       smtp_client_command_new(conn, flags + \
+       smtp_client_command_new(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                (smtp_client_command_callback_t *)callback, context)
@@ -108,7 +108,7 @@ smtp_client_command_noop_submit_after(
        void *context);
 #define smtp_client_command_noop_submit_after(conn, \
        flags, after, callback, context) \
-       smtp_client_command_noop_submit_after(conn, flags + \
+       smtp_client_command_noop_submit_after(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), after, \
                (smtp_client_command_callback_t *)callback, context)
@@ -120,7 +120,7 @@ smtp_client_command_noop_submit(
        void *context);
 #define smtp_client_command_noop_submit(conn, \
                flags, callback, context) \
-       smtp_client_command_noop_submit(conn, flags + \
+       smtp_client_command_noop_submit(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                (smtp_client_command_callback_t *)callback, context)
@@ -136,7 +136,7 @@ smtp_client_command_vrfy_submit_after(
        void *context);
 #define smtp_client_command_vrfy_submit_after(conn, \
                flags, after, param, callback, context) \
-       smtp_client_command_vrfy_submit_after(conn, flags + \
+       smtp_client_command_vrfy_submit_after(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                after, param, \
@@ -150,7 +150,7 @@ smtp_client_command_vrfy_submit(
                          void *context);
 #define smtp_client_command_vrfy_submit(conn, \
                flags, param, callback, context) \
-       smtp_client_command_vrfy_submit(conn, flags + \
+       smtp_client_command_vrfy_submit(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                param, (smtp_client_command_callback_t *)callback, context)
@@ -165,7 +165,7 @@ smtp_client_command_rset_submit_after(
        void *context);
 #define smtp_client_command_rset_submit_after(conn, \
                flags, after, callback, context) \
-       smtp_client_command_rset_submit_after(conn, flags + \
+       smtp_client_command_rset_submit_after(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                after, (smtp_client_command_callback_t *)callback, context)
@@ -177,7 +177,7 @@ smtp_client_command_rset_submit(
        void *context);
 #define smtp_client_command_rset_submit(conn, \
                flags, callback, context) \
-       smtp_client_command_rset_submit(conn, flags + \
+       smtp_client_command_rset_submit(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                (smtp_client_command_callback_t *)callback, context)
@@ -193,7 +193,7 @@ smtp_client_command_mail_submit(
        void *context);
 #define smtp_client_command_mail_submit(conn, \
                flags, address, params, callback, context) \
-       smtp_client_command_mail_submit(conn, flags + \
+       smtp_client_command_mail_submit(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                address, params, \
@@ -211,7 +211,7 @@ smtp_client_command_rcpt_submit_after(
        void *context);
 #define smtp_client_command_rcpt_submit_after(conn, \
                flags, after, to, params, callback, context) \
-       smtp_client_command_rcpt_submit_after(conn, flags + \
+       smtp_client_command_rcpt_submit_after(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                after, to, params, \
@@ -226,7 +226,7 @@ smtp_client_command_rcpt_submit(
        void *context);
 #define smtp_client_command_rcpt_submit(conn, \
                flags, to, params, callback, context) \
-       smtp_client_command_rcpt_submit(conn, flags + \
+       smtp_client_command_rcpt_submit(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                to, params, \
@@ -246,7 +246,7 @@ smtp_client_command_data_submit_after(
        void *context);
 #define smtp_client_command_data_submit_after(conn, \
                flags, after, data, callback, context) \
-       smtp_client_command_data_submit_after(conn, flags + \
+       smtp_client_command_data_submit_after(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                after, data, (smtp_client_command_callback_t *)callback, context)
@@ -259,7 +259,7 @@ smtp_client_command_data_submit(
        void *context);
 #define smtp_client_command_data_submit(conn, \
                flags, data, callback, context) \
-       smtp_client_command_data_submit(conn, flags + \
+       smtp_client_command_data_submit(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                data, (smtp_client_command_callback_t *)callback, context)
index 449768121f9a9b3fcea68a8dad75b8babf717264..428bb9ce0b3a028493035f88155d74e72c362c2b 100644 (file)
@@ -45,7 +45,7 @@ smtp_client_transaction_create_empty(
        smtp_client_transaction_callback_t *callback, void *context)
        ATTR_NULL(4);
 #define smtp_client_transaction_create_empty(conn, flags, callback, context) \
-       smtp_client_transaction_create_empty(conn, flags + \
+       smtp_client_transaction_create_empty(conn, flags - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (smtp_client_transaction_callback_t *)callback, context)
 /* Create a new transaction, including the parameters for the MAIL FROM
@@ -59,7 +59,7 @@ smtp_client_transaction_create(struct smtp_client_connection *conn,
                ATTR_NULL(2, 3, 6);
 #define smtp_client_transaction_create(conn, \
                mail_from, mail_params, flags, callback, context) \
-       smtp_client_transaction_create(conn, mail_from, mail_params, flags + \
+       smtp_client_transaction_create(conn, mail_from, mail_params, flags - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (smtp_client_transaction_callback_t *)callback, context)
 
@@ -88,7 +88,7 @@ void smtp_client_transaction_start(struct smtp_client_transaction *trans,
 #define smtp_client_transaction_start(trans, mail_callback, context) \
        smtp_client_transaction_start(trans, \
                (smtp_client_command_callback_t *)mail_callback, \
-               context + CALLBACK_TYPECHECK(mail_callback, void (*)( \
+               context - CALLBACK_TYPECHECK(mail_callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))))
 /* Start the transaction with a MAIL command. This function allows providing the
    parameters for the MAIL FROM command for when the transaction was created
@@ -107,7 +107,7 @@ void smtp_client_transaction_start_empty(
                                            mail_callback, context) \
        smtp_client_transaction_start_empty(trans, mail_from, mail_params, \
                (smtp_client_command_callback_t *)mail_callback, \
-               context + CALLBACK_TYPECHECK(mail_callback, void (*)( \
+               context - CALLBACK_TYPECHECK(mail_callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))))
 
 /* Add an extra pipelined MAIL command to the transaction. The mail_callback is
@@ -127,7 +127,7 @@ smtp_client_transaction_add_mail(struct smtp_client_transaction *trans,
        ATTR_NOWARN_UNUSED_RESULT ATTR_NULL(3,5);
 #define smtp_client_transaction_add_mail(trans, \
                mail_from, mail_params, mail_callback, context) \
-       smtp_client_transaction_add_mail(trans, mail_from + \
+       smtp_client_transaction_add_mail(trans, mail_from - \
                CALLBACK_TYPECHECK(mail_callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                mail_params, \
@@ -155,9 +155,9 @@ smtp_client_transaction_add_rcpt(struct smtp_client_transaction *trans,
        ATTR_NOWARN_UNUSED_RESULT ATTR_NULL(3,5,6);
 #define smtp_client_transaction_add_rcpt(trans, \
                rcpt_to, rcpt_params, rcpt_callback, data_callback, context) \
-       smtp_client_transaction_add_rcpt(trans, rcpt_to + \
+       smtp_client_transaction_add_rcpt(trans, rcpt_to - \
                CALLBACK_TYPECHECK(rcpt_callback, void (*)( \
-                       const struct smtp_reply *reply, typeof(context))) + \
+                       const struct smtp_reply *reply, typeof(context))) - \
                CALLBACK_TYPECHECK(data_callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                rcpt_params, \
@@ -179,7 +179,7 @@ smtp_client_transaction_add_pool_rcpt(
        ATTR_NOWARN_UNUSED_RESULT ATTR_NULL(4,6,7);
 #define smtp_client_transaction_add_pool_rcpt(trans, pool, \
                rcpt_to, rcpt_params, rcpt_callback, context) \
-       smtp_client_transaction_add_pool_rcpt(trans, pool, rcpt_to + \
+       smtp_client_transaction_add_pool_rcpt(trans, pool, rcpt_to - \
                CALLBACK_TYPECHECK(rcpt_callback, void (*)( \
                        const struct smtp_reply *reply, typeof(context))), \
                rcpt_params, \
@@ -215,7 +215,7 @@ void smtp_client_transaction_send(
        smtp_client_command_callback_t *data_callback, void *data_context);
 #define smtp_client_transaction_send(trans, \
                data_input, data_callback, data_context) \
-       smtp_client_transaction_send(trans, data_input + \
+       smtp_client_transaction_send(trans, data_input - \
                CALLBACK_TYPECHECK(data_callback, void (*)( \
                        const struct smtp_reply *reply, typeof(data_context))), \
                (smtp_client_command_callback_t *)data_callback, data_context)
@@ -230,7 +230,7 @@ void smtp_client_transaction_reset(
 #define smtp_client_transaction_reset(trans, reset_callback, reset_context) \
        smtp_client_transaction_reset(trans, \
                (smtp_client_command_callback_t *)reset_callback, \
-               reset_context + CALLBACK_TYPECHECK(reset_callback, void (*)( \
+               reset_context - CALLBACK_TYPECHECK(reset_callback, void (*)( \
                        const struct smtp_reply *reply, typeof(reset_context))))
 
 /* Enables mode in which all commands are submitted immediately and (non-
index 1e973d1cf9cc91264a0b89ccbf76355d91b280a9..21b96843bd69a235a2efe23207326470d9dea109 100644 (file)
@@ -330,7 +330,7 @@ void smtp_server_connection_input_capture(
        struct smtp_server_connection *conn,
        smtp_server_input_callback_t *callback, void *context);
 #define smtp_server_connection_input_capture(conn, callback, context) \
-       smtp_server_connection_input_capture(conn + \
+       smtp_server_connection_input_capture(conn - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (smtp_server_input_callback_t *)callback, context)
 
index b4828f1aaf94528c0c271f4db7c463a386c77ae8..b176a40f602b02f750b36f10a024919c9ebcb3c7 100644 (file)
@@ -106,7 +106,7 @@ void smtp_server_recipient_add_hook(struct smtp_server_recipient *rcpt,
                                  smtp_server_rcpt_func_t func,
                                  void *context);
 #define smtp_server_recipient_add_hook(_rcpt, _type, _func, _context) \
-       smtp_server_recipient_add_hook((_rcpt), (_type) + \
+       smtp_server_recipient_add_hook((_rcpt), (_type) - \
                CALLBACK_TYPECHECK(_func, void (*)( \
                        struct smtp_server_recipient *, typeof(_context))), \
                (smtp_server_rcpt_func_t *)(_func), (_context))
@@ -536,7 +536,7 @@ void smtp_server_command_add_hook(struct smtp_server_command *cmd,
                                  smtp_server_cmd_func_t func,
                                  void *context);
 #define smtp_server_command_add_hook(_cmd, _type, _func, _context) \
-       smtp_server_command_add_hook((_cmd), (_type) + \
+       smtp_server_command_add_hook((_cmd), (_type) - \
                CALLBACK_TYPECHECK(_func, void (*)( \
                        struct smtp_server_cmd_ctx *, typeof(_context))), \
                (smtp_server_cmd_func_t *)(_func), (_context))
index f423cb01d55e56b43f02e07180bacf420b044e51..f52dc4f92d1c6d774d5705566d6e1f055ad88b5e 100644 (file)
@@ -60,7 +60,7 @@ void smtp_submit_run_async(struct smtp_submit *subm,
 #define smtp_submit_run_async(subm, callback, context) \
        smtp_submit_run_async(subm, \
                (smtp_submit_callback_t*)callback, \
-               (char*)context + CALLBACK_TYPECHECK(callback, \
+               (char*)context - CALLBACK_TYPECHECK(callback, \
                        void (*)(const struct smtp_submit_result *result, typeof(context))))
 
 /* Returns 1 on success, 0 on permanent failure (e.g. invalid destination),
index f2aca6927d1ba1dc33f6cdd88a3b2b5a2db3af6f..a6600ff18301395aa99ded7513a4ccf87ac8f242 100644 (file)
@@ -120,7 +120,7 @@ void sql_exec(struct sql_db *db, const char *query);
 void sql_query(struct sql_db *db, const char *query,
               sql_query_callback_t *callback, void *context);
 #define sql_query(db, query, callback, context) \
-       sql_query(db, query + \
+       sql_query(db, query - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        struct sql_result *, typeof(context))), \
                (sql_query_callback_t *)callback, context)
@@ -149,7 +149,7 @@ void sql_statement_query(struct sql_statement **stmt,
                         sql_query_callback_t *callback, void *context);
 #define sql_statement_query(stmt, callback, context) \
        sql_statement_query(stmt, \
-               (sql_query_callback_t *)callback, context + \
+               (sql_query_callback_t *)callback, context - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        struct sql_result *, typeof(context))))
 struct sql_result *sql_statement_query_s(struct sql_statement **stmt);
@@ -167,7 +167,7 @@ int sql_result_next_row(struct sql_result *result);
 void sql_result_more(struct sql_result **result,
                     sql_query_callback_t *callback, void *context);
 #define sql_result_more(result, callback, context) \
-       sql_result_more(result + \
+       sql_result_more(result - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        struct sql_result *, typeof(context))), \
                (sql_query_callback_t *)callback, context)
@@ -217,7 +217,7 @@ struct sql_transaction_context *sql_transaction_begin(struct sql_db *db);
 void sql_transaction_commit(struct sql_transaction_context **ctx,
                            sql_commit_callback_t *callback, void *context);
 #define sql_transaction_commit(ctx, callback, context) \
-         sql_transaction_commit(ctx + \
+         sql_transaction_commit(ctx - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct sql_commit_result *, typeof(context))), \
                (sql_commit_callback_t *)callback, context)
index 913d1323b2e193a6f2b2fd338c979082ccc7d6fe..da92866a4743bbe1b2c07c6e705d048fb378a578 100644 (file)
@@ -104,7 +104,7 @@ typedef int maildir_file_do_func(struct maildir_mailbox *mbox,
 int maildir_file_do(struct maildir_mailbox *mbox, uint32_t uid,
                    maildir_file_do_func *callback, void *context);
 #define maildir_file_do(mbox, seq, callback, context) \
-       maildir_file_do(mbox, seq + \
+       maildir_file_do(mbox, seq - \
                CALLBACK_TYPECHECK(callback, int (*)( \
                        struct maildir_mailbox *, const char *, typeof(context))), \
                (maildir_file_do_func *)callback, context)
index 612659a7239728c4e4fa1f0cd68484502c06f702..d3754ed66c76e6155e66544c75f24f685eda7929 100644 (file)
@@ -126,7 +126,7 @@ int mail_search_mime_args_foreach(struct mail_search_mime_arg *args,
                             mail_search_mime_foreach_callback_t *callback,
                             void *context) ATTR_NULL(3);
 #define mail_search_mime_args_foreach(args, callback, context) \
-         mail_search_mime_args_foreach(args + \
+         mail_search_mime_args_foreach(args - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        struct mail_search_mime_arg *, typeof(context))), \
                (mail_search_mime_foreach_callback_t *)callback, context)
index 8222c6d38ada3821c4b302da97838f609939fb9e..69c5f8699878a68db38b7387eebbb60d218c270e 100644 (file)
@@ -205,7 +205,7 @@ int mail_search_args_foreach(struct mail_search_arg *args,
                             mail_search_foreach_callback_t *callback,
                             void *context) ATTR_NULL(3);
 #define mail_search_args_foreach(args, callback, context) \
-         mail_search_args_foreach(args + \
+         mail_search_args_foreach(args - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        struct mail_search_arg *, typeof(context))), \
                (mail_search_foreach_callback_t *)callback, context)
index c33f79809f4aacacb3472be4efd6821c6b08cca4..bb8b2843383c1cf2f484d3e65e8122eab71907b8 100644 (file)
@@ -650,7 +650,7 @@ void mailbox_notify_changes(struct mailbox *box,
        ATTR_NULL(3);
 #define mailbox_notify_changes(box, callback, context) \
          mailbox_notify_changes(box, (mailbox_notify_callback_t *)callback, \
-               (void *)((char *)context + CALLBACK_TYPECHECK(callback, \
+               (void *)((char *)context - CALLBACK_TYPECHECK(callback, \
                        void (*)(struct mailbox *, typeof(context)))))
 void mailbox_notify_changes_stop(struct mailbox *box);
 
index 6504c8905b8d25bbff6f0510f7626424676c0058..ed8f0e54fa5e569bcbad8d85b3de3c223e99cc60 100644 (file)
@@ -59,7 +59,7 @@ int mailbox_list_notify_next(struct mailbox_list_notify *notify,
 void mailbox_list_notify_wait(struct mailbox_list_notify *notify,
                              mailbox_list_notify_callback_t *callback, void *context);
 #define mailbox_list_notify_wait(notify, callback, context) \
-       mailbox_list_notify_wait(notify + CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
+       mailbox_list_notify_wait(notify - CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                                (mailbox_list_notify_callback_t*)callback, context);
 /* Flush any delayed notifications now. */
 void mailbox_list_notify_flush(struct mailbox_list_notify *notify);
index 7d54c9d21f86c53ff0254d1f9ca18bd74bc79739..0890fd525600e9f1f80613baf473b5017054f473 100644 (file)
@@ -344,9 +344,9 @@ bool array_equal_fn_i(const struct array *array1,
                      const struct array *array2,
                      int (*cmp)(const void*, const void *)) ATTR_PURE;
 #define array_equal_fn(array1, array2, cmp)                            \
-       array_equal_fn_i(&(array1)->arr +                                       \
+       array_equal_fn_i(&(array1)->arr -                                       \
                       ARRAY_TYPES_CHECK(array1, array2),               \
-                      &(array2)->arr +                                 \
+                      &(array2)->arr -                                 \
                       CALLBACK_TYPECHECK(cmp, int (*)(typeof(*(array1)->v), \
                                                       typeof(*(array2)->v))), \
                       (int (*)(const void *, const void *))cmp)
@@ -359,9 +359,9 @@ bool array_equal_fn_ctx_i(const struct array *array1,
    so ``const typeof(*context)*'' is required instead, and that requires a
    complete type. */
 #define array_equal_fn_ctx(array1, array2, cmp, ctx)                   \
-       array_equal_fn_ctx_i(&(array1)->arr +                           \
+       array_equal_fn_ctx_i(&(array1)->arr -                           \
                             ARRAY_TYPES_CHECK(array1, array2),         \
-                            &(array2)->arr +                           \
+                            &(array2)->arr -                           \
                             CALLBACK_TYPECHECK(cmp, int (*)(typeof(*(array1)->v), \
                                                             typeof(*(array2)->v), \
                                                             const typeof(*ctx)*)), \
@@ -374,7 +374,7 @@ void array_reverse_i(struct array *array);
 
 void array_sort_i(struct array *array, int (*cmp)(const void *, const void *));
 #define array_sort(array, cmp) \
-       array_sort_i(&(array)->arr + \
+       array_sort_i(&(array)->arr - \
                CALLBACK_TYPECHECK(cmp, int (*)(typeof(*(array)->v), \
                                                typeof(*(array)->v))), \
                (int (*)(const void *, const void *))cmp)
@@ -382,7 +382,7 @@ void array_sort_i(struct array *array, int (*cmp)(const void *, const void *));
 void *array_bsearch_i(struct array *array, const void *key,
                      int (*cmp)(const void *, const void *));
 #define array_bsearch(array, key, cmp) \
-       ARRAY_TYPE_CAST_MODIFIABLE(array)array_bsearch_i(&(array)->arr + \
+       ARRAY_TYPE_CAST_MODIFIABLE(array)array_bsearch_i(&(array)->arr - \
                CALLBACK_TYPECHECK(cmp, int (*)(typeof(const typeof(*key) *), \
                                                typeof(*(array)->v))), \
                (const void *)key, (int (*)(const void *, const void *))cmp)
@@ -397,7 +397,7 @@ static inline void *array_lsearch_modifiable_i(struct array *array, const void *
 }
 #define ARRAY_LSEARCH_CALL(modifiable, array, key, cmp)                        \
        array_lsearch##modifiable##i(                                   \
-               &(array)->arr +                                         \
+               &(array)->arr -                                         \
                CALLBACK_TYPECHECK(cmp, int (*)(typeof(const typeof(*key) *), \
                                                typeof(*(array)->v))),  \
                (const void *)key,                                      \
index 1378df47f178b100bc006e0ff819e21e02fb70b5..320182be60eab8d1364bb9072abceef56fe0db68 100644 (file)
@@ -34,7 +34,7 @@ bsearch_insert_pos(const void *key, const void *base, unsigned int nmemb,
                   size_t size, int (*cmp)(const void *, const void *),
                   unsigned int *idx_r);
 #define bsearch_insert_pos(key, base, nmemb, size, cmp, idx_r) \
-       bsearch_insert_pos(key, base, nmemb, size + \
+       bsearch_insert_pos(key, base, nmemb, size - \
                CALLBACK_TYPECHECK(cmp, int (*)(typeof(const typeof(*key) *), \
                                                typeof(const typeof(*base) *))), \
                (int (*)(const void *, const void *))cmp, idx_r)
@@ -44,7 +44,7 @@ array_bsearch_insert_pos_i(const struct array *array, const void *key,
                           int (*cmp)(const void *, const void *),
                           unsigned int *idx_r);
 #define array_bsearch_insert_pos(array, key, cmp, idx_r) \
-       array_bsearch_insert_pos_i(&(array)->arr + \
+       array_bsearch_insert_pos_i(&(array)->arr - \
                CALLBACK_TYPECHECK(cmp, int (*)(typeof(const typeof(*key) *), \
                                                typeof(*(array)->v))), \
                (const void *)key, (int (*)(const void *, const void *))cmp, idx_r)
index 6d19f734c0e21eeccff24e0a1b489425af8014eb..c495638cc18c9d4d36f465e743be7ee4e6293f63 100644 (file)
@@ -15,7 +15,7 @@ struct child_wait *
 child_wait_new_with_pid(pid_t pid, child_wait_callback_t *callback,
                        void *context) ATTR_NULL(3);
 #define child_wait_new_with_pid(pid, callback, context) \
-       child_wait_new_with_pid(pid + \
+       child_wait_new_with_pid(pid - \
                CALLBACK_TYPECHECK(callback, void (*)( \
                        const struct child_wait_status *status, typeof(context))), \
        (child_wait_callback_t *)callback, context)
index 36f9b3198487bd89e772e7cbbae3eb0d1e004bdb..5178d135f1e1e2e934d4f82daa1540f904a138a1 100644 (file)
@@ -54,7 +54,7 @@ struct io *io_add(int fd, enum io_condition condition,
                  unsigned int source_linenum,
                  io_callback_t *callback, void *context) ATTR_NULL(5);
 #define io_add(fd, condition, callback, context) \
-       io_add(fd, condition, __FILE__, __LINE__ + \
+       io_add(fd, condition, __FILE__, __LINE__ - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (io_callback_t *)callback, context)
 struct io *io_add_to(struct ioloop *ioloop, int fd, enum io_condition condition,
@@ -62,7 +62,7 @@ struct io *io_add_to(struct ioloop *ioloop, int fd, enum io_condition condition,
                  unsigned int source_linenum,
                  io_callback_t *callback, void *context) ATTR_NULL(5);
 #define io_add_to(ioloop, fd, condition, callback, context) \
-       io_add_to(ioloop, fd, condition, __FILE__, __LINE__ + \
+       io_add_to(ioloop, fd, condition, __FILE__, __LINE__ - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (io_callback_t *)callback, context)
 
@@ -72,7 +72,7 @@ io_add_notify(const char *path, const char *source_filename,
              io_callback_t *callback, void *context,
              struct io **io_r) ATTR_NULL(3);
 #define io_add_notify(path, callback, context, io_r) \
-       io_add_notify(path, __FILE__, __LINE__ + \
+       io_add_notify(path, __FILE__, __LINE__ - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (io_callback_t *)callback, context, io_r)
 
@@ -80,7 +80,7 @@ struct io *io_add_istream(struct istream *input, const char *source_filename,
                          unsigned int source_linenum,
                          io_callback_t *callback, void *context) ATTR_NULL(3);
 #define io_add_istream(input, callback, context) \
-       io_add_istream(input, __FILE__, __LINE__ + \
+       io_add_istream(input, __FILE__, __LINE__ - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (io_callback_t *)callback, context)
 struct io *io_add_istream_to(struct ioloop *ioloop, struct istream *input,
@@ -89,7 +89,7 @@ struct io *io_add_istream_to(struct ioloop *ioloop, struct istream *input,
                             io_callback_t *callback, void *context)
        ATTR_NULL(3);
 #define io_add_istream_to(ioloop, input, callback, context) \
-       io_add_istream_to(ioloop, input, __FILE__, __LINE__ + \
+       io_add_istream_to(ioloop, input, __FILE__, __LINE__ - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (io_callback_t *)callback, context)
 
@@ -118,8 +118,8 @@ timeout_add(unsigned int msecs, const char *source_filename,
            unsigned int source_linenum,
            timeout_callback_t *callback, void *context) ATTR_NULL(4);
 #define timeout_add(msecs, callback, context) \
-       timeout_add(msecs, __FILE__, __LINE__ + \
-               CALLBACK_TYPECHECK(callback, void (*)(typeof(context))) + \
+       timeout_add(msecs, __FILE__, __LINE__ - \
+               CALLBACK_TYPECHECK(callback, void (*)(typeof(context))) - \
                COMPILE_ERROR_IF_TRUE(__builtin_constant_p(msecs) && \
                                      ((msecs) > 0 && (msecs) < 1000)), \
                (io_callback_t *)callback, context)
@@ -128,8 +128,8 @@ timeout_add_to(struct ioloop *ioloop, unsigned int msecs,
               const char *source_filename, unsigned int source_linenum,
               timeout_callback_t *callback, void *context) ATTR_NULL(4);
 #define timeout_add_to(ioloop, msecs, callback, context) \
-       timeout_add_to(ioloop, msecs, __FILE__, __LINE__ + \
-               CALLBACK_TYPECHECK(callback, void (*)(typeof(context))) + \
+       timeout_add_to(ioloop, msecs, __FILE__, __LINE__ - \
+               CALLBACK_TYPECHECK(callback, void (*)(typeof(context))) - \
                COMPILE_ERROR_IF_TRUE(__builtin_constant_p(msecs) && \
                                      ((msecs) > 0 && (msecs) < 1000)), \
                (io_callback_t *)callback, context)
@@ -139,7 +139,7 @@ timeout_add_short(unsigned int msecs, const char *source_filename,
                  unsigned int source_linenum,
                  timeout_callback_t *callback, void *context) ATTR_NULL(4);
 #define timeout_add_short(msecs, callback, context) \
-       timeout_add_short(msecs, __FILE__, __LINE__ + \
+       timeout_add_short(msecs, __FILE__, __LINE__ - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (io_callback_t *)callback, context)
 struct timeout *
@@ -147,7 +147,7 @@ timeout_add_short_to(struct ioloop *ioloop, unsigned int msecs,
                     const char *source_filename, unsigned int source_linenum,
                     timeout_callback_t *callback, void *context) ATTR_NULL(4);
 #define timeout_add_short_to(ioloop, msecs, callback, context) \
-       timeout_add_short_to(ioloop, msecs, __FILE__, __LINE__ + \
+       timeout_add_short_to(ioloop, msecs, __FILE__, __LINE__ - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (io_callback_t *)callback, context)
 
@@ -157,7 +157,7 @@ timeout_add_absolute(const struct timeval *time,
                     unsigned int source_linenum,
                     timeout_callback_t *callback, void *context) ATTR_NULL(4);
 #define timeout_add_absolute(time, callback, context) \
-       timeout_add_absolute(time, __FILE__, __LINE__ + \
+       timeout_add_absolute(time, __FILE__, __LINE__ - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (io_callback_t *)callback, context)
 struct timeout *
@@ -167,7 +167,7 @@ timeout_add_absolute_to(struct ioloop *ioloop,
                        unsigned int source_linenum,
                        timeout_callback_t *callback, void *context) ATTR_NULL(4);
 #define timeout_add_absolute_to(ioloop, time, callback, context) \
-       timeout_add_absolute_to(ioloop, time, __FILE__, __LINE__ + \
+       timeout_add_absolute_to(ioloop, time, __FILE__, __LINE__ - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (io_callback_t *)callback, context)
 
@@ -230,7 +230,7 @@ void io_loop_context_add_callbacks(struct ioloop_context *ctx,
                                   io_callback_t *deactivate, void *context);
 #define io_loop_context_add_callbacks(ctx, activate, deactivate, context) \
        io_loop_context_add_callbacks(ctx, 1 ? (io_callback_t *)activate : \
-               CALLBACK_TYPECHECK(activate, void (*)(typeof(context))) + \
+               CALLBACK_TYPECHECK(activate, void (*)(typeof(context))) - \
                CALLBACK_TYPECHECK(deactivate, void (*)(typeof(context))), \
                (io_callback_t *)deactivate, context)
 /* Remove callbacks with the given callbacks and context. */
@@ -239,7 +239,7 @@ void io_loop_context_remove_callbacks(struct ioloop_context *ctx,
                                      io_callback_t *deactivate, void *context);
 #define io_loop_context_remove_callbacks(ctx, activate, deactivate, context) \
        io_loop_context_remove_callbacks(ctx, 1 ? (io_callback_t *)activate : \
-               CALLBACK_TYPECHECK(activate, void (*)(typeof(context))) + \
+               CALLBACK_TYPECHECK(activate, void (*)(typeof(context))) - \
                CALLBACK_TYPECHECK(deactivate, void (*)(typeof(context))), \
                (io_callback_t *)deactivate, context)
 /* Returns the current context set to ioloop. */
index 81f62d90755361fd5d4ffdb79d0157d69adeeabf..4b7286cd47a32bf4654e5964b09a6cc241bedd63 100644 (file)
@@ -75,7 +75,7 @@ bool iostream_proxy_is_waiting_output(struct iostream_proxy *proxy,
 void iostream_proxy_set_completion_callback(struct iostream_proxy *proxy,
                                       iostream_proxy_callback_t *callback, void *context);
 #define iostream_proxy_set_completion_callback(proxy, callback, context) \
-       iostream_proxy_set_completion_callback(proxy, (iostream_proxy_callback_t *)callback, context + \
+       iostream_proxy_set_completion_callback(proxy, (iostream_proxy_callback_t *)callback, context - \
                CALLBACK_TYPECHECK(callback, void (*)(enum iostream_proxy_side side, enum iostream_proxy_status, typeof(context))))
 
 void iostream_proxy_ref(struct iostream_proxy *proxy);
index 44dc8428d36f6ed65104eb3eb06222dd31aac518..9cadd8ba05e05cba9232cb48931ece8bac47da8c 100644 (file)
@@ -52,7 +52,7 @@ void iostream_pump_set_completion_callback(struct iostream_pump *pump,
 #define iostream_pump_set_completion_callback(pump, callback, context) \
        iostream_pump_set_completion_callback(pump, \
                (iostream_pump_callback_t *)callback, \
-               context + CALLBACK_TYPECHECK(callback, \
+               context - CALLBACK_TYPECHECK(callback, \
                        void (*)(enum iostream_pump_status, typeof(context))))
 
 /* Returns TRUE if the pump is currently only writing to the ostream. The input
index b0c2dc14628b8306295bba53148a20cb0d8d6560..7cbb6c6fe635d0f2f8af43fc46f18ab18329e2f9 100644 (file)
@@ -33,7 +33,7 @@ i_stream_create_sized_with_callback(struct istream *input, uoff_t size,
                                    istream_sized_callback_t *error_callback,
                                    void *context);
 #define i_stream_create_sized_with_callback(input, size, error_callback, context) \
-       i_stream_create_sized_with_callback(input, size + \
+       i_stream_create_sized_with_callback(input, size - \
                CALLBACK_TYPECHECK(error_callback, \
                        const char *(*)(const struct istream_sized_error_data *, typeof(context))), \
                (istream_sized_callback_t *)error_callback, context)
index 4dcaa5216cb78c5fcc1730ab696ab1fc85ed5dfd..27c7b70f0ad942a6344864115b34dc856c830303 100644 (file)
@@ -91,7 +91,7 @@ void i_stream_add_destroy_callback(struct istream *stream,
                                   istream_callback_t *callback, void *context)
        ATTR_NULL(3);
 #define i_stream_add_destroy_callback(stream, callback, context) \
-       i_stream_add_destroy_callback(stream + \
+       i_stream_add_destroy_callback(stream - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (istream_callback_t *)callback, context)
 /* Remove the destroy callback. */
index d72a8ce36637b7a6323e6a67b1de701f25ee12d1..5efe4bc13f9b71cecbb70408e6331176dabf1e8c 100644 (file)
@@ -167,7 +167,7 @@ struct event *event_set_log_prefix_callback(struct event *event,
                                            void *context);
 #define event_set_log_prefix_callback(event, replace, callback, context) \
        event_set_log_prefix_callback(event, replace, (event_log_prefix_callback_t*)callback, \
-               context + CALLBACK_TYPECHECK(callback, const char *(*)(typeof(context))))
+               context - CALLBACK_TYPECHECK(callback, const char *(*)(typeof(context))))
 
 /* Set the event's name. The name is specific to a single sending of an event,
    and it'll be automatically cleared once the event is sent. This should
index fc13b20befab31f282dcd3c08c9b30723296f96f..be98239752fe55b9722fea5ae22143920b7f16ff 100644 (file)
@@ -19,7 +19,7 @@ struct log_throttle *
 log_throttle_init(const struct log_throttle_settings *set,
                  log_throttle_callback_t *callback, void *context);
 #define log_throttle_init(set, callback, context) \
-       log_throttle_init(set + \
+       log_throttle_init(set - \
                CALLBACK_TYPECHECK(callback, void (*)(unsigned int, typeof(context))), \
                (log_throttle_callback_t *)callback, context)
 void log_throttle_deinit(struct log_throttle **throttle);
index a01659f1cee12835a39132eace2401696e81f266..9c546df15cb0cf56dc9889c9e455947735463cbc 100644 (file)
@@ -9,7 +9,7 @@ struct memarea *
 memarea_init(const void *data, size_t size,
             memarea_free_callback_t *callback, void *context);
 #define memarea_init(data, size, callback, context) \
-       memarea_init(data, size + \
+       memarea_init(data, size - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (memarea_free_callback_t *)callback, context)
 /* Returns an empty memory area. */
index 718e111c99a84ca66f05090e3d4a908c5f128726..25a09cc55e0eb3ea6f0217fb1366cc2d1569d1e8 100644 (file)
@@ -92,7 +92,7 @@ void o_stream_add_destroy_callback(struct ostream *stream,
                                   ostream_callback_t *callback, void *context)
        ATTR_NULL(3);
 #define o_stream_add_destroy_callback(stream, callback, context) \
-       o_stream_add_destroy_callback(stream + \
+       o_stream_add_destroy_callback(stream - \
                CALLBACK_TYPECHECK(callback, void (*)(typeof(context))), \
                (ostream_callback_t *)callback, context)
 /* Remove the destroy callback. */
@@ -115,7 +115,7 @@ void o_stream_set_flush_callback(struct ostream *stream,
                                 stream_flush_callback_t *callback,
                                 void *context) ATTR_NULL(3);
 #define o_stream_set_flush_callback(stream, callback, context) \
-       o_stream_set_flush_callback(stream + \
+       o_stream_set_flush_callback(stream - \
                CALLBACK_TYPECHECK(callback, int (*)(typeof(context))), \
                (stream_flush_callback_t *)callback, context)
 void o_stream_unset_flush_callback(struct ostream *stream);
index 0e956e9844da70ba9f6172201563c6f9e37f40eb..94cab81542202c35938b7cea52599f028f0ac5eb 100644 (file)
@@ -16,13 +16,13 @@ INTEGER_CMP(uint64_cmp, uint64_t)
 INTEGER_CMP(uint32_cmp, uint32_t)
 
 #define i_qsort(base, nmemb, size, cmp) \
-       qsort(base, nmemb, size +                                       \
+       qsort(base, nmemb, size -                                       \
              CALLBACK_TYPECHECK(cmp, int (*)(typeof(const typeof(*base) *), \
                                              typeof(const typeof(*base) *))), \
              (int (*)(const void *, const void *))cmp)
 
 #define i_bsearch(key, base, nmemb, size, cmp) \
-       bsearch(key, base, nmemb, size + \
+       bsearch(key, base, nmemb, size - \
                CALLBACK_TYPECHECK(cmp, int (*)(typeof(const typeof(*key) *), \
                                                typeof(const typeof(*base) *))), \
                (int (*)(const void *, const void *))cmp)