[Groonga-commit] groonga/groonga at fcb5ff5 [master] ii: suppress warnings

Back to archive index

Kouhei Sutou null+****@clear*****
Thu Apr 6 11:38:27 JST 2017


Kouhei Sutou	2017-04-06 11:38:27 +0900 (Thu, 06 Apr 2017)

  New Revision: fcb5ff5e5711904a810dedfb2b62bccf1dd74eab
  https://github.com/groonga/groonga/commit/fcb5ff5e5711904a810dedfb2b62bccf1dd74eab

  Message:
    ii: suppress warnings
    
        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;
                    ^~~~

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+1 -1)
===================================================================
--- lib/ii.c    2017-04-06 11:31:14 +0900 (2495b22)
+++ lib/ii.c    2017-04-06 11:38:27 +0900 (e7f4aec)
@@ -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,
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index