Skip to content

Commit

Permalink
lib-mail: message-parser: Fixed Clang 6.0 compiler warning.
Browse files Browse the repository at this point in the history
Warning was:

index-mail.c:1182:3: warning: arithmetic on a null pointer treated as a cast
from integer to pointer is a GNU extension [-Wnull-pointer-arithmetic]
                message_parser_parse_body(data->parser_ctx,
                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../src/lib-mail/message-parser.h:95:28: note: expanded from macro
'message_parser_parse_body'
                (void *)((char *)context + CALLBACK_TYPECHECK(callback, \
                         ~~~~~~~~~~~~~~~ ^
  • Loading branch information
stephanbosch authored and villesavolainen committed Feb 6, 2019
1 parent 79b652f commit 6015914
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib-mail/message-parser.h
Expand Up @@ -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 *)((char *)context + CALLBACK_TYPECHECK(callback, \
(void *)((uintptr_t)context + CALLBACK_TYPECHECK(callback, \
void (*)(struct message_part *, \
struct message_header_line *, typeof(context)))))

Expand Down

0 comments on commit 6015914

Please sign in to comment.