[Groonga-commit] groonga/groonga at 82f4526 [master] Suppress a warning

Back to archive index

Kouhei Sutou null+****@clear*****
Mon Oct 24 15:51:25 JST 2016


Kouhei Sutou	2016-10-24 15:51:25 +0900 (Mon, 24 Oct 2016)

  New Revision: 82f4526060bad71ac712d689f9709f5b15c84f31
  https://github.com/groonga/groonga/commit/82f4526060bad71ac712d689f9709f5b15c84f31

  Message:
    Suppress a warning
    
        cursor-factory.cpp: In static member function 'static grn::dat::Cursor* grn::dat::CursorFactory::open(const grn::dat::Trie&, const void*, grn::dat::UInt32, const void*, grn::dat::UInt32, grn::dat::UInt32, grn::dat::UInt32, grn::dat::UInt32)':
        cursor-factory.cpp:35:39: warning: the compiler can assume that the address of 'trie' will never be NULL [-Waddress]
           GRN_DAT_THROW_IF(PARAM_ERROR, &trie == NULL);
                                               ^
        dat.hpp:233:13: note: in definition of macro 'GRN_DAT_THROW_IF'
           (void)((!(cond)) || (GRN_DAT_THROW(code, #cond), 0))
                     ^~~~

  Modified files:
    lib/dat/cursor-factory.cpp

  Modified: lib/dat/cursor-factory.cpp (+0 -2)
===================================================================
--- lib/dat/cursor-factory.cpp    2016-10-24 15:50:16 +0900 (6dab51a)
+++ lib/dat/cursor-factory.cpp    2016-10-24 15:51:25 +0900 (b47323a)
@@ -32,8 +32,6 @@ Cursor *CursorFactory::open(const Trie &trie,
                             UInt32 offset,
                             UInt32 limit,
                             UInt32 flags) {
-  GRN_DAT_THROW_IF(PARAM_ERROR, &trie == NULL);
-
   const UInt32 cursor_type = flags & CURSOR_TYPE_MASK;
   switch (cursor_type) {
     case ID_RANGE_CURSOR: {
-------------- next part --------------
HTML����������������������������...
Download 



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