diff options
author | NIIBE Yutaka <[email protected]> | 2023-07-17 06:23:54 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2023-07-17 06:23:54 +0000 |
commit | 0e8105a364c8cac68a254b5617a83987cc44fcff (patch) | |
tree | 05417cd886a1ac1957970449a3396b4d439bc8d7 /gpgscm/scheme.c | |
parent | yat2m: Fix Windows build (diff) | |
download | libgpg-error-0e8105a364c8cac68a254b5617a83987cc44fcff.tar.gz libgpg-error-0e8105a364c8cac68a254b5617a83987cc44fcff.zip |
gpgscm: Incorporate changes from GnuPG.
* gpgscm/scheme.c [__GNUC__] (type_to_string): Use
__builtin_unreachable for GCC.
* gpgscm/ffi.c (do_get_temp_path): Remove the last backslash.
* gpgscm/ffi.c (do_chdir): Use gpg_error_from_syserror.
--
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'gpgscm/scheme.c')
-rw-r--r-- | gpgscm/scheme.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gpgscm/scheme.c b/gpgscm/scheme.c index eb57ba4..b53f79e 100644 --- a/gpgscm/scheme.c +++ b/gpgscm/scheme.c @@ -170,7 +170,11 @@ type_to_string (enum scheme_types typ) case T_SINK: return "sink"; case T_FRAME: return "frame"; } +#ifdef __GNUC__ + __builtin_unreachable (); +#else assert (! "not reached"); +#endif } /* ADJ is enough slack to align cells in a TYPE_BITS-bit boundary */ @@ -5570,7 +5574,7 @@ static const struct scheme_interface vtbl = { }; #endif -scheme *scheme_init_new() { +scheme *scheme_init_new(void) { scheme *sc=(scheme*)malloc(sizeof(scheme)); if(!scheme_init(sc)) { free(sc); |