Navigation Menu

Skip to content

Commit

Permalink
clang: suppress a warning
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kou committed Jun 11, 2013
1 parent fd32766 commit 13b03cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/plugin.c
Expand Up @@ -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) {
Expand Down

0 comments on commit 13b03cc

Please sign in to comment.