[Groonga-commit] groonga/groonga [master] clang: suppress a warning

Back to archive index

null+****@clear***** null+****@clear*****
Fri Aug 10 18:13:40 JST 2012


Kouhei Sutou	2012-08-10 18:13:40 +0900 (Fri, 10 Aug 2012)

  New Revision: 4c23126b4c7e29c165202cb3ce35ea76400e4816
  https://github.com/groonga/groonga/commit/4c23126b4c7e29c165202cb3ce35ea76400e4816

  Log:
    clang: suppress a warning
    
    pat.c:396:75: warning: for loop has empty body [-Wempty-body]
      for (w_of_element = 0; (1 << w_of_element) < entry_size; w_of_element++);
                                                                              ^
    pat.c:396:75: note: put the semicolon on a separate line to silence this
          warning [-Wempty-body]

  Modified files:
    lib/pat.c

  Modified: lib/pat.c (+3 -1)
===================================================================
--- lib/pat.c    2012-08-10 18:11:49 +0900 (6722ab9)
+++ lib/pat.c    2012-08-10 18:13:40 +0900 (e3f4710)
@@ -393,7 +393,9 @@ _grn_pat_create(grn_ctx *ctx, grn_pat *pat,
   } else {
     entry_size = value_size;
   }
-  for (w_of_element = 0; (1 << w_of_element) < entry_size; w_of_element++);
+  for (w_of_element = 0; (1 << w_of_element) < entry_size; w_of_element++) {
+    /* nop */
+  }
   {
     grn_io_array_spec array_spec[3];
     array_spec[segment_key].w_of_element = 0;
-------------- next part --------------
HTML����������������������������...
Download 



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