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

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Jun 11 17:52:20 JST 2013


Kouhei Sutou	2013-06-11 17:52:20 +0900 (Tue, 11 Jun 2013)

  New Revision: 13b03cc07a010e4f0e4297b2acdc96346451719c
  https://github.com/groonga/groonga/commit/13b03cc07a010e4f0e4297b2acdc96346451719c

  Message:
    clang: suppress a warning
    
    Initialize variable explicitly.
    
        plugin.c:178:44: warning: variable 'plugin' is uninitialized when used here
              [-Wuninitialized]
          if ((id = grn_plugin_find(ctx, filename, plugin))) {
                                                   ^~~~~~
        plugin.c:176:22: note: initialize the variable 'plugin' to silence this warning
          grn_plugin **plugin;
                             ^
                              = NULL

  Modified files:
    lib/plugin.c

  Modified: lib/plugin.c (+1 -1)
===================================================================
--- lib/plugin.c    2013-06-11 17:51:07 +0900 (1577618)
+++ lib/plugin.c    2013-06-11 17:52:20 +0900 (a16fa55)
@@ -173,7 +173,7 @@ grn_plugin_open(grn_ctx *ctx, const char *filename)
 {
   grn_id id;
   grn_dl dl;
-  grn_plugin **plugin;
+  grn_plugin **plugin = NULL;
 
   if ((id = grn_plugin_find(ctx, filename, plugin))) {
     if (plugin && *plugin) {
-------------- next part --------------
HTML����������������������������...
下载 



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