Fixed some issues raised by eqvinox in pull request.
PR URL: 1b25eae747
This commit is contained in:
parent
1b25eae747
commit
ef88fd8e9d
3 changed files with 7 additions and 9 deletions
|
|
@ -8,6 +8,10 @@
|
|||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||
#endif
|
||||
|
||||
#include "capnp_c.h"
|
||||
#include "capnp_priv.h"
|
||||
#include <stdlib.h>
|
||||
|
|
@ -25,10 +29,6 @@ struct check_segment_alignment {
|
|||
};
|
||||
|
||||
static struct capn_segment *create(void *u, uint32_t id, int sz) {
|
||||
// Silence warnings about unused parameters.
|
||||
UNUSED(u);
|
||||
UNUSED(id);
|
||||
|
||||
struct capn_segment *s;
|
||||
sz += sizeof(*s);
|
||||
if (sz < 4096) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,9 @@
|
|||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
#ifdef __GNUC__
|
||||
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
|
||||
#endif
|
||||
|
||||
#include "capnp_c.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -13,11 +13,7 @@
|
|||
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
|
||||
// ssize_t is defined in unistd.h in GCC.
|
||||
#ifdef __GNUC__
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(unix) && !defined(__APPLE__)
|
||||
#include <endian.h>
|
||||
|
|
@ -33,7 +29,7 @@ typedef intmax_t ssize_t;
|
|||
#define UNUSED(x) (void)(x)
|
||||
#endif
|
||||
|
||||
// Cross-platform macro ALIGNED_(x) aligns a struct by `x` bits.
|
||||
// Cross-platform macro ALIGNED_(x) aligns a struct by `x` bytes.
|
||||
#ifdef _MSC_VER
|
||||
#define ALIGNED_(x) __declspec(align(x))
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue