Fix random warnings
Signed-off-by: David Lamparter <equinox@diac24.net>
This commit is contained in:
parent
c79b3afbbd
commit
b2b7ade9c0
2 changed files with 4 additions and 2 deletions
|
|
@ -5,6 +5,7 @@
|
|||
* This software may be modified and distributed under the terms
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
#define _POSIX_C_SOURCE 200809L
|
||||
|
||||
#include "schema.capnp.h"
|
||||
#include "str.h"
|
||||
|
|
@ -12,6 +13,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
|
||||
struct value {
|
||||
struct Type t;
|
||||
|
|
|
|||
|
|
@ -413,7 +413,7 @@ int64_t capn_size(struct capn *c)
|
|||
size_t headersz, datasz = 0;
|
||||
struct capn_ptr root;
|
||||
struct capn_segment *seg;
|
||||
int i;
|
||||
uint32_t i;
|
||||
|
||||
if (c->segnum == 0)
|
||||
return -1;
|
||||
|
|
@ -421,7 +421,7 @@ int64_t capn_size(struct capn *c)
|
|||
root = capn_root(c);
|
||||
seg = root.seg;
|
||||
|
||||
headersz = 8 * ((2 + c->segnum) / 2);
|
||||
headersz = 8 * ((2 + c->segnum) / 2);
|
||||
|
||||
for (i = 0; i < c->segnum; i++, seg = seg->next) {
|
||||
if (0 == seg)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue