[Groonga-commit] groonga/groonga at 35a4262 [master] Modify for suppressing a warning that C4018. (#904)

Back to archive index
Yasuhiro Horimoto null+****@clear*****
Wed Feb 27 08:45:32 JST 2019


Yasuhiro Horimoto	2019-02-27 08:45:32 +0900 (Wed, 27 Feb 2019)

  Revision: 35a4262458651c5de1fe628037bccf4b1e136ef1
  https://github.com/groonga/groonga/commit/35a4262458651c5de1fe628037bccf4b1e136ef1

  Message:
    Modify for suppressing a warning that C4018. (#904)
    
    A type of variable "i" is int and a type of variable
    "n_floating_threads" is uint32_t.
    So, if the size of the value of "n_floating_threads"
    over the size of "int", "i" occurs overflow.

  Modified files:
    src/groonga.c

  Modified: src/groonga.c (+1 -1)
===================================================================
--- src/groonga.c    2019-02-26 11:28:28 +0900 (42854c98f)
+++ src/groonga.c    2019-02-27 08:45:32 +0900 (82ca479b0)
@@ -961,7 +961,7 @@ run_server_loop(grn_ctx *ctx, grn_com_event *ev)
   }
   running_event_loop = GRN_FALSE;
   for (;;) {
-    int i;
+    uint32_t i;
     CRITICAL_SECTION_ENTER(q_critical_section);
     for (i = 0; i < n_floating_threads; i++) {
       COND_SIGNAL(q_cond);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190227/0b39287e/attachment.html>


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