Navigation Menu

Skip to content

Commit

Permalink
ii: suppress warnings
Browse files Browse the repository at this point in the history
    ii.c: In function 'buffer_split.isra.60':
    ii.c:397:59: warning: 'dls1' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if (lseg >= ii->header->bmax) { ii->header->bmax = lseg + 1; }
                                                          ~~~~~^~~
    ii.c:3745:30: note: 'dls1' was declared here
       uint32_t dps0, dps1, dls0, dls1, sps, scn, dcn0 = 0, dcn1 = 0;
                                  ^~~~
    ii.c:397:59: warning: 'dls0' may be used uninitialized in this function [-Wmaybe-uninitialized]
       if (lseg >= ii->header->bmax) { ii->header->bmax = lseg + 1; }
                                                          ~~~~~^~~
    ii.c:3745:24: note: 'dls0' was declared here
       uint32_t dps0, dps1, dls0, dls1, sps, scn, dcn0 = 0, dcn1 = 0;
                            ^~~~
    In file included from ../include/groonga.h:22:0,
                     from grn.h:761,
                     from ii.c:17:
    ../include/groonga/groonga.h:1108:5: warning: 'dps1' may be used uninitialized in this function [-Wmaybe-uninitialized]
         grn_logger_put(ctx, (level), __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__); \
         ^~~~~~~~~~~~~~
    ii.c:3745:18: note: 'dps1' was declared here
       uint32_t dps0, dps1, dls0, dls1, sps, scn, dcn0 = 0, dcn1 = 0;
                      ^~~~
    In file included from ../include/groonga.h:22:0,
                     from grn.h:761,
                     from ii.c:17:
    ../include/groonga/groonga.h:1108:5: warning: 'dps0' may be used uninitialized in this function [-Wmaybe-uninitialized]
         grn_logger_put(ctx, (level), __FILE__, __LINE__, __FUNCTION__, __VA_ARGS__); \
         ^~~~~~~~~~~~~~
    ii.c:3745:12: note: 'dps0' was declared here
       uint32_t dps0, dps1, dls0, dls1, sps, scn, dcn0 = 0, dcn1 = 0;
                ^~~~
  • Loading branch information
kou committed Apr 6, 2017
1 parent dafd707 commit fcb5ff5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ii.c
Expand Up @@ -3742,7 +3742,7 @@ buffer_split(grn_ctx *ctx, grn_ii *ii, uint32_t seg, grn_hash *h)
grn_io_win sw, dw0, dw1;
buffer *sb, *db0 = NULL, *db1 = NULL;
uint8_t *sc = NULL, *dc0, *dc1;
uint32_t dps0, dps1, dls0, dls1, sps, scn, dcn0 = 0, dcn1 = 0;
uint32_t dps0 = 0, dps1 = 0, dls0 = 0, dls1 = 0, sps, scn, dcn0 = 0, dcn1 = 0;
if (ii->header->binfo[seg] == NOT_ASSIGNED) {
DEFINE_NAME(ii);
CRIT(GRN_FILE_CORRUPT,
Expand Down

0 comments on commit fcb5ff5

Please sign in to comment.