bool charset_found = FALSE;
rfc822_parser_init(&parser, hdr->full_value, hdr->full_value_len, NULL);
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
str = t_str_new(256);
if (rfc822_parse_content_type(&parser, str) < 0)
string_t *str;
rfc822_parser_init(&parser, hdr->full_value, hdr->full_value_len, NULL);
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
str = t_str_new(256);
if (rfc822_parse_mime_token(&parser, str) >= 0) {
string_t *str;
rfc822_parser_init(&parser, hdr->full_value, hdr->full_value_len, NULL);
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
str = t_str_new(256);
if (rfc822_parse_mime_token(&parser, str) < 0)
str = t_str_new(128);
str_append_c(str, '"');
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
while (rfc822_parse_atom(&parser, str) >= 0) {
str_append(str, "\" \"");
if (parser.data == parser.end || *parser.data != ',')
break;
parser.data++;
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
}
if (str_len(str) > 1) {
/* [weekday_name "," ] dd month_name [yy]yy hh:mi[:ss] timezone */
memset(&tm, 0, sizeof(tm));
- (void)rfc822_skip_lwsp(&ctx->parser);
+ rfc822_skip_lwsp(&ctx->parser);
/* skip the optional weekday */
if (next_token(ctx, &value, &len) <= 0)
if (*ctx->parser.data != ',')
return FALSE;
ctx->parser.data++;
- (void)rfc822_skip_lwsp(&ctx->parser);
+ rfc822_skip_lwsp(&ctx->parser);
if (next_token(ctx, &value, &len) <= 0)
return FALSE;
if (!IS_TIME_SEP(*ctx->parser.data))
return FALSE;
ctx->parser.data++;
- (void)rfc822_skip_lwsp(&ctx->parser);
+ rfc822_skip_lwsp(&ctx->parser);
if (next_token(ctx, &value, &len) < 0 || len != 2 ||
!i_isdigit(value[0]) || !i_isdigit(value[1]))
if (ctx->parser.data != ctx->parser.end &&
IS_TIME_SEP(*ctx->parser.data)) {
ctx->parser.data++;
- (void)rfc822_skip_lwsp(&ctx->parser);
+ rfc822_skip_lwsp(&ctx->parser);
if (next_token(ctx, &value, &len) <= 0 || len != 2 ||
!i_isdigit(value[0]) || !i_isdigit(value[1]))
value = t_str_new(64);
rfc822_parser_init(&parser, hdr->full_value, hdr->full_value_len, NULL);
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
(void)rfc822_parse_mime_token(&parser, value);
ctx->content_type = CONTENT_TYPE_UNKNOWN;
return;
rfc822_parser_init(&parser, hdr->full_value, hdr->full_value_len, NULL);
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
str = t_str_new(64);
if (rfc822_parse_content_type(&parser, str) <= 0)
return;
no-fold-literal = "[" *(dtext / quoted-pair) "]"
*/
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
if (*parser.data == '"')
ret = rfc822_parse_quoted_string(&parser, msgid);
return FALSE;
str_append_c(msgid, '@');
parser.data++;
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
if (rfc822_parse_dot_atom(&parser, msgid) <= 0)
return FALSE;
ctx->part_seen_content_type = TRUE;
rfc822_parser_init(&parser, hdr->full_value, hdr->full_value_len, NULL);
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
content_type = t_str_new(64);
if (rfc822_parse_content_type(&parser, content_type) < 0)
string_t *content_type;
rfc822_parser_init(&parser, hdr->full_value, hdr->full_value_len, NULL);
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
content_type = t_str_new(64);
if (rfc822_parse_content_type(&parser, content_type) >= 0) {
/* Parse comment. Assumes parser's data points to '(' */
int rfc822_skip_comment(struct rfc822_parser_context *ctx);
/* Skip LWSP if there is any */
-int rfc822_skip_lwsp(struct rfc822_parser_context *ctx);
+int ATTR_NOWARN_UNUSED_RESULT
+rfc822_skip_lwsp(struct rfc822_parser_context *ctx);
/* Stop at next non-atext char */
int rfc822_parse_atom(struct rfc822_parser_context *ctx, string_t *str);
/* Like parse_atom() but don't stop at '.' */
string_t *content_type;
rfc822_parser_init(&parser, hdr->full_value, hdr->full_value_len, NULL);
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
T_BEGIN {
content_type = t_str_new(64);
return TRUE;
}
-static struct hash_node *
+static struct hash_node * ATTR_NOWARN_UNUSED_RESULT
hash_table_insert_node(struct hash_table *table, void *key, void *value,
bool check_existing)
{
void hash_table_update(struct hash_table *table, void *key, void *value)
{
- (void)hash_table_insert_node(table, key, value, TRUE);
+ hash_table_insert_node(table, key, value, TRUE);
}
static void
for (i = 0; i < old_size; i++) {
node = &old_nodes[i];
if (node->key != NULL) {
- (void)hash_table_insert_node(table, node->key,
- node->value, FALSE);
+ hash_table_insert_node(table, node->key,
+ node->value, FALSE);
}
for (node = node->next; node != NULL; node = next) {
next = node->next;
if (node->key != NULL) {
- (void)hash_table_insert_node(table, node->key,
- node->value, FALSE);
+ hash_table_insert_node(table, node->key,
+ node->value, FALSE);
}
free_node(table, node);
}
* This processes one or more 64-byte data blocks, but does NOT update
* the bit counters. There're no alignment requirements.
*/
-static const void *body(struct md4_context *ctx, const void *data, size_t size)
+static const void * ATTR_NOWARN_UNUSED_RESULT
+body(struct md4_context *ctx, const void *data, size_t size)
{
const unsigned char *ptr;
uint32_t a, b, c, d;
memcpy(&ctx->buffer[used], data, free);
data = (const unsigned char *) data + free;
size -= free;
- (void)body(ctx, ctx->buffer, 64);
+ body(ctx, ctx->buffer, 64);
}
if (size >= 64) {
if (free < 8) {
memset(&ctx->buffer[used], 0, free);
- (void)body(ctx, ctx->buffer, 64);
+ body(ctx, ctx->buffer, 64);
used = 0;
free = 64;
}
ctx->buffer[62] = ctx->hi >> 16;
ctx->buffer[63] = ctx->hi >> 24;
- (void)body(ctx, ctx->buffer, 64);
+ body(ctx, ctx->buffer, 64);
result[0] = ctx->a;
result[1] = ctx->a >> 8;
* This processes one or more 64-byte data blocks, but does NOT update
* the bit counters. There're no alignment requirements.
*/
-static const void *body(struct md5_context *ctx, const void *data, size_t size)
+static const void * ATTR_NOWARN_UNUSED_RESULT
+body(struct md5_context *ctx, const void *data, size_t size)
{
const unsigned char *ptr;
uint_fast32_t a, b, c, d;
memcpy(&ctx->buffer[used], data, free);
data = (const unsigned char *) data + free;
size -= free;
- (void)body(ctx, ctx->buffer, 64);
+ body(ctx, ctx->buffer, 64);
}
if (size >= 64) {
if (free < 8) {
memset(&ctx->buffer[used], 0, free);
- (void)body(ctx, ctx->buffer, 64);
+ body(ctx, ctx->buffer, 64);
used = 0;
free = 64;
}
ctx->buffer[62] = ctx->hi >> 16;
ctx->buffer[63] = ctx->hi >> 24;
- (void)body(ctx, ctx->buffer, 64);
+ body(ctx, ctx->buffer, 64);
result[0] = ctx->a;
result[1] = ctx->a >> 8;
iov.iov_base = data;
iov.iov_len = size;
- (void)o_stream_nsendv(stream, &iov, 1);
+ o_stream_nsendv(stream, &iov, 1);
}
void o_stream_nsendv(struct ostream *stream, const struct const_iovec *iov,
string_t *content_type;
rfc822_parser_init(&parser, hdr->full_value, hdr->full_value_len, NULL);
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
T_BEGIN {
content_type = t_str_new(64);
rfc822_parser_init(&parser, (const unsigned char *)content_disposition,
strlen(content_disposition), NULL);
- (void)rfc822_skip_lwsp(&parser);
+ rfc822_skip_lwsp(&parser);
/* type; param; param; .. */
str = t_str_new(32);