[Groonga-commit] groonga/groonga [master] suppress a bad-function-cast warning.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 11月 12日 (土) 14:54:52 JST


Kouhei Sutou	2011-11-12 05:54:52 +0000 (Sat, 12 Nov 2011)

  New Revision: f6440c8ec5731c9b84bac388190e861f65c1d991

  Log:
    suppress a bad-function-cast warning.

  Modified files:
    lib/geo.c

  Modified: lib/geo.c (+3 -1)
===================================================================
--- lib/geo.c    2011-11-12 05:53:06 +0000 (bdac70a)
+++ lib/geo.c    2011-11-12 05:54:52 +0000 (9fc1205)
@@ -1212,6 +1212,7 @@ grn_geo_estimate_in_rectangle(grn_ctx *ctx,
     int select_latitude_distance, select_longitude_distance;
     int total_latitude_distance, total_longitude_distance;
     double select_ratio;
+    double estimated_n_records;
 
     rc = geo_point_get(ctx, data.pat, GRN_CURSOR_ASCENDING, &min);
     if (!rc) {
@@ -1241,7 +1242,8 @@ grn_geo_estimate_in_rectangle(grn_ctx *ctx,
       select_ratio *= ((double)select_longitude_distance /
                        (double)total_longitude_distance);
     }
-    n = (int)(ceil(total_records * select_ratio));
+    estimated_n_records = ceil(total_records * select_ratio);
+    n = (int)estimated_n_records;
   }
 
 exit :




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