/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 plugins.d/askpass-fifo.c

  • Committer: Teddy Hogeborn
  • Date: 2019-02-11 05:14:10 UTC
  • Revision ID: teddy@recompile.se-20190211051410-43fmzhy0vlafw2pc
Fix warnings from -Wimplicit-fallthrough

* plugin-runner.c (main/parse_opt): Add __builtin_unreachable() after
                                    calls to argp_state_help().
* plugins.d/askpass-fifo.c (error_plus): Add __builtin_unreachable()
                                         after calls to error().
* plugins.d/mandos-client.c (main/parse_opt) Add
                                             __builtin_unreachable()
                                             after calls to
                                             argp_state_help().
* plugins.d/password-prompt.c: - '' -

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
    fprintf(stderr, ": ");
66
66
    fprintf(stderr, "%s\n", strerror(errnum));
67
67
    error(status, errno, "vasprintf while printing error");
 
68
    if(status){
 
69
      __builtin_unreachable();
 
70
    }
68
71
    return;
69
72
  }
70
73
  fprintf(stderr, "Mandos plugin ");
71
74
  error(status, errnum, "%s", text);
 
75
  if(status){
 
76
    __builtin_unreachable();
 
77
  }
72
78
  free(text);
73
79
}
74
80
 
90
96
    case ENOTDIR:
91
97
    case ELOOP:
92
98
      error_plus(EX_OSFILE, errno, "mkfifo");
 
99
      __builtin_unreachable();
93
100
    case ENAMETOOLONG:
94
101
    case ENOSPC:
95
102
    case EROFS:
96
103
    default:
97
104
      error_plus(EX_OSERR, errno, "mkfifo");
 
105
      __builtin_unreachable();
98
106
    case ENOENT:
99
107
      /* no "/lib/cryptsetup"? */
100
108
      error_plus(EX_UNAVAILABLE, errno, "mkfifo");
 
109
      __builtin_unreachable();
101
110
    case EEXIST:
102
111
      break;                    /* not an error */
103
112
    }