/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to plugin-runner.c

  • Committer: Teddy Hogeborn
  • Date: 2019-07-07 19:15:30 UTC
  • Revision ID: teddy@recompile.se-20190707191530-ugewhobirslgih74
plugin-runner.c: Switch to attribute to mark switch fallthrough

* plugin-runner.c (main/parse_opt): Change /* FALLTHROUGH */ comment
                                    to __attribute__((fallthrough)),
                                    as required by
                                    -Wimplicit-fallthrough=5.

Show diffs side-by-side

added added

removed removed

Lines of Context:
313
313
__attribute__((nonnull))
314
314
static void free_plugin(plugin *plugin_node){
315
315
  
316
 
  for(char **arg = plugin_node->argv; *arg != NULL; arg++){
 
316
  for(char **arg = (plugin_node->argv)+1; *arg != NULL; arg++){
317
317
    free(*arg);
318
318
  }
 
319
  free(plugin_node->name);
319
320
  free(plugin_node->argv);
320
321
  for(char **env = plugin_node->environ; *env != NULL; env++){
321
322
    free(*env);
585
586
      if(arg[0] == '\0'){
586
587
        break;
587
588
      }
588
 
      /* FALLTHROUGH */
 
589
      __attribute__((fallthrough));
589
590
    default:
590
591
      return ARGP_ERR_UNKNOWN;
591
592
    }