diff options
author | George Hazan <george.hazan@gmail.com> | 2015-07-23 08:28:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-07-23 08:28:34 +0000 |
commit | 371c87af33810c934034161947c143ccbf6aa01b (patch) | |
tree | 59e6cca98e1019ab519306bf9cd6ab75624be908 /plugins/MirOTR/Libgcrypt | |
parent | 0c47fa983161b4db0b7bd4105cebae0ddae707c8 (diff) |
various warning & compilation fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@14648 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/Libgcrypt')
-rw-r--r-- | plugins/MirOTR/Libgcrypt/cipher/cipher.c | 8 | ||||
-rw-r--r-- | plugins/MirOTR/Libgcrypt/cipher/mac.c | 2 | ||||
-rw-r--r-- | plugins/MirOTR/Libgcrypt/cipher/md.c | 8 | ||||
-rw-r--r-- | plugins/MirOTR/Libgcrypt/cipher/pubkey-util.c | 4 | ||||
-rw-r--r-- | plugins/MirOTR/Libgcrypt/cipher/pubkey.c | 4 | ||||
-rw-r--r-- | plugins/MirOTR/Libgcrypt/custom/config.h | 3 | ||||
-rw-r--r-- | plugins/MirOTR/Libgcrypt/mpi/mpi-mpow.c | 2 | ||||
-rw-r--r-- | plugins/MirOTR/Libgcrypt/src/visibility.c | 5 |
8 files changed, 17 insertions, 19 deletions
diff --git a/plugins/MirOTR/Libgcrypt/cipher/cipher.c b/plugins/MirOTR/Libgcrypt/cipher/cipher.c index 8c5a0b4ed8..6a42bfaa30 100644 --- a/plugins/MirOTR/Libgcrypt/cipher/cipher.c +++ b/plugins/MirOTR/Libgcrypt/cipher/cipher.c @@ -124,12 +124,12 @@ spec_from_name (const char *name) for (idx=0; (spec = cipher_list[idx]); idx++) { - if (!stricmp (name, spec->name)) + if (!_stricmp (name, spec->name)) return spec; if (spec->aliases) { for (aliases = spec->aliases; *aliases; aliases++) - if (!stricmp (name, *aliases)) + if (!_stricmp (name, *aliases)) return spec; } } @@ -152,7 +152,7 @@ spec_from_oid (const char *oid) if (oid_specs) { for (j = 0; oid_specs[j].oid; j++) - if (!stricmp (oid, oid_specs[j].oid)) + if (!_stricmp (oid, oid_specs[j].oid)) return spec; } } @@ -180,7 +180,7 @@ search_oid (const char *oid, gcry_cipher_oid_spec_t *oid_spec) if (spec && spec->oids) { for (i = 0; spec->oids[i].oid; i++) - if (!stricmp (oid, spec->oids[i].oid)) + if (!_stricmp (oid, spec->oids[i].oid)) { if (oid_spec) *oid_spec = spec->oids[i]; diff --git a/plugins/MirOTR/Libgcrypt/cipher/mac.c b/plugins/MirOTR/Libgcrypt/cipher/mac.c index d87ac13761..5514ddc3a8 100644 --- a/plugins/MirOTR/Libgcrypt/cipher/mac.c +++ b/plugins/MirOTR/Libgcrypt/cipher/mac.c @@ -129,7 +129,7 @@ spec_from_name (const char *name) int idx; for (idx = 0; (spec = mac_list[idx]); idx++) - if (!stricmp (name, spec->name)) + if (!_stricmp (name, spec->name)) return spec; return NULL; diff --git a/plugins/MirOTR/Libgcrypt/cipher/md.c b/plugins/MirOTR/Libgcrypt/cipher/md.c index 008ef5b230..20b652e03b 100644 --- a/plugins/MirOTR/Libgcrypt/cipher/md.c +++ b/plugins/MirOTR/Libgcrypt/cipher/md.c @@ -153,7 +153,7 @@ spec_from_name (const char *name) for (idx=0; (spec = digest_list[idx]); idx++) { - if (!stricmp (name, spec->name)) + if (!_stricmp (name, spec->name)) return spec; } @@ -175,7 +175,7 @@ spec_from_oid (const char *oid) if (oid_specs) { for (j = 0; oid_specs[j].oidstring; j++) - if (!stricmp (oid, oid_specs[j].oidstring)) + if (!_stricmp (oid, oid_specs[j].oidstring)) return spec; } } @@ -198,7 +198,7 @@ search_oid (const char *oid, gcry_md_oid_spec_t *oid_spec) if (spec && spec->oids) { for (i = 0; spec->oids[i].oidstring; i++) - if (!stricmp (oid, spec->oids[i].oidstring)) + if (!_stricmp (oid, spec->oids[i].oidstring)) { if (oid_spec) *oid_spec = spec->oids[i]; @@ -1141,7 +1141,7 @@ md_stop_debug( gcry_md_hd_t md ) #ifdef HAVE_U64_TYPEDEF { /* a kludge to pull in the __muldi3 for Solaris */ - volatile u32 a = (u32)(ulong)md; + volatile u32 a = (u32)md; volatile u64 b = 42; volatile u64 c; c = a * b; diff --git a/plugins/MirOTR/Libgcrypt/cipher/pubkey-util.c b/plugins/MirOTR/Libgcrypt/cipher/pubkey-util.c index 616b4990fe..71312828bf 100644 --- a/plugins/MirOTR/Libgcrypt/cipher/pubkey-util.c +++ b/plugins/MirOTR/Libgcrypt/cipher/pubkey-util.c @@ -391,7 +391,7 @@ _gcry_pk_util_preparse_sigval (gcry_sexp_t s_sig, const char **algo_names, } for (i=0; algo_names[i]; i++) - if (!stricmp (name, algo_names[i])) + if (!_stricmp (name, algo_names[i])) break; if (!algo_names[i]) { @@ -562,7 +562,7 @@ _gcry_pk_util_preparse_encval (gcry_sexp_t sexp, const char **algo_names, parsed_flags |= PUBKEY_FLAG_LEGACYRESULT; for (i=0; algo_names[i]; i++) - if (!stricmp (name, algo_names[i])) + if (!_stricmp (name, algo_names[i])) break; if (!algo_names[i]) { diff --git a/plugins/MirOTR/Libgcrypt/cipher/pubkey.c b/plugins/MirOTR/Libgcrypt/cipher/pubkey.c index b31e9df2f9..d8f5f5d0ea 100644 --- a/plugins/MirOTR/Libgcrypt/cipher/pubkey.c +++ b/plugins/MirOTR/Libgcrypt/cipher/pubkey.c @@ -96,10 +96,10 @@ spec_from_name (const char *name) for (idx=0; (spec = pubkey_list[idx]); idx++) { - if (!stricmp (name, spec->name)) + if (!_stricmp (name, spec->name)) return spec; for (aliases = spec->aliases; *aliases; aliases++) - if (!stricmp (name, *aliases)) + if (!_stricmp (name, *aliases)) return spec; } diff --git a/plugins/MirOTR/Libgcrypt/custom/config.h b/plugins/MirOTR/Libgcrypt/custom/config.h index bee3c5761e..5263060745 100644 --- a/plugins/MirOTR/Libgcrypt/custom/config.h +++ b/plugins/MirOTR/Libgcrypt/custom/config.h @@ -618,9 +618,6 @@ /* Miranda NG modifications */ #define GPGRT_ENABLE_ES_MACROS 1 #include <string.h> -#define strdup _strdup -#define stricmp _stricmp -#define snprintf _snprintf #ifdef _WIN64 # define __x86_64__ 1 #else diff --git a/plugins/MirOTR/Libgcrypt/mpi/mpi-mpow.c b/plugins/MirOTR/Libgcrypt/mpi/mpi-mpow.c index 43bd641fb5..0e84e99861 100644 --- a/plugins/MirOTR/Libgcrypt/mpi/mpi-mpow.c +++ b/plugins/MirOTR/Libgcrypt/mpi/mpi-mpow.c @@ -89,7 +89,7 @@ _gcry_mpi_mulpowm( gcry_mpi_t res, gcry_mpi_t *basearray, gcry_mpi_t *exparray, gcry_assert (t); gcry_assert (k < 10); - G = xcalloc( (1<<k) , sizeof *G ); + G = xcalloc(1 << k, sizeof *G); #ifdef USE_BARRETT barrett_y = init_barrett( m, &barrett_k, &barrett_r1, &barrett_r2 ); #endif diff --git a/plugins/MirOTR/Libgcrypt/src/visibility.c b/plugins/MirOTR/Libgcrypt/src/visibility.c index 2989498e10..4bbfd0ad3c 100644 --- a/plugins/MirOTR/Libgcrypt/src/visibility.c +++ b/plugins/MirOTR/Libgcrypt/src/visibility.c @@ -292,7 +292,7 @@ gcry_mpi_copy (const gcry_mpi_t a) void gcry_mpi_snatch (gcry_mpi_t w, const gcry_mpi_t u) { - return _gcry_mpi_snatch (w, u); + _gcry_mpi_snatch (w, u); } gcry_mpi_t @@ -675,8 +675,9 @@ _gcry_mpi_get_const (int no) case 3: return _gcry_mpi_const (MPI_C_THREE); case 4: return _gcry_mpi_const (MPI_C_FOUR); case 8: return _gcry_mpi_const (MPI_C_EIGHT); - default: log_bug("unsupported GCRYMPI_CONST_ macro used\n"); } + log_bug("unsupported GCRYMPI_CONST_ macro used\n"); + return NULL; } gcry_error_t |