[Groonga-commit] groonga/groonga [master] add explicit double -> UInt64 cast for gcc on Solaris.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 11月 8日 (火) 17:09:27 JST


Kouhei Sutou	2011-11-08 08:09:27 +0000 (Tue, 08 Nov 2011)

  New Revision: e7adaa91e34ae0c2e3910245b3da8e0d29dd68f5

  Log:
    add explicit double -> UInt64 cast for gcc on Solaris.
    
    gcc:
      % gcc --version
      gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
      Copyright (C) 2004 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    Solaris:
      Oracle Solaris 10 8/11

  Modified files:
    lib/dat/trie.cpp

  Modified: lib/dat/trie.cpp (+1 -1)
===================================================================
--- lib/dat/trie.cpp    2011-11-08 07:58:55 +0000 (a7ee1f5)
+++ lib/dat/trie.cpp    2011-11-08 08:09:27 +0000 (eb9bb87)
@@ -174,7 +174,7 @@ void Trie::create_file(const char *file_name,
 
     // The last term is the estimated number of bytes that will be used for
     // 32-bit alignment.
-    const UInt64 total_num_bytes = total_key_length
+    const UInt64 total_num_bytes = (UInt64)(total_key_length)
         + (UInt64)(sizeof(UInt32) + sizeof(UInt8)) * max_num_keys
         + (UInt32)(max_num_keys * 1.5);
     GRN_DAT_THROW_IF(PARAM_ERROR,




Groonga-commit メーリングリストの案内
Back to archive index