[Groonga-commit] groonga/groonga [master] suppress overflow.

Back to archive index

null+****@clear***** null+****@clear*****
2010年 9月 4日 (土) 18:39:22 JST


Kouhei Sutou	2010-09-04 09:39:22 +0000 (Sat, 04 Sep 2010)

  New Revision: 6490e452f56b047bb1159ffa9bb562fb1cc6254f

  Log:
    suppress overflow.
    
    Reported by OBATA Akio. Thanks!!!

  Modified files:
    test/unit/core/test-inspect.c

  Modified: test/unit/core/test-inspect.c (+2 -1)
===================================================================
--- test/unit/core/test-inspect.c    2010-09-04 08:59:15 +0000 (f09af36)
+++ test/unit/core/test-inspect.c    2010-09-04 09:39:22 +0000 (5dfefe7)
@@ -307,7 +307,8 @@ test_time(void)
   g_time_val_from_iso8601("2010-05-31T11:50:29.29+0900", &g_time_value);
   time_value = grn_obj_open(context, GRN_BULK, 0, GRN_DB_TIME);
   GRN_TIME_SET(context, time_value,
-               g_time_value.tv_sec * G_USEC_PER_SEC + g_time_value.tv_usec);
+               (gint64)g_time_value.tv_sec * G_USEC_PER_SEC +
+               g_time_value.tv_usec);
   inspected = grn_inspect(context, NULL, time_value);
   cut_assert_equal_string(cut_take_printf("%ld.29", g_time_value.tv_sec),
                           inspected_string());




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