]> jfr.im git - irc/hexchat/hexchat.git/commitdiff
Fix various compiler warnings.
authorSadie Powell <redacted>
Sun, 28 Aug 2022 16:59:42 +0000 (17:59 +0100)
committerPatrick <redacted>
Mon, 29 Aug 2022 18:50:03 +0000 (13:50 -0500)
fish.c: -Wincompatible-pointer-types
fkeys.c: -Wmisleading-indentation
proto-irc.c: -Wincompatible-pointer-types
util.c: -Wdeprecated-declarations
xtext.c: -Wmaybe-uninitialized

plugins/fishlim/fish.c
src/common/proto-irc.c
src/common/util.c
src/fe-gtk/fkeys.c
src/fe-gtk/xtext.c

index 5a27e4cbc7f66c7f2dc40885f3de66036ea345ea..7fe7e287d4740dffdfcdfdedd133d576225acaef 100644 (file)
@@ -91,7 +91,7 @@ static const signed char fish_unbase64[256] = {
 #include <openssl/provider.h>
 static OSSL_PROVIDER *legacy_provider;
 static OSSL_PROVIDER *default_provider;
-static OSSL_LIB_CTX* *ossl_ctx;
+static OSSL_LIB_CTX *ossl_ctx;
 #endif
 
 int fish_init(void)
index 32cc47f2e68d338017601ba044399287cdb890b4..5b8e02c48f088ab6dbba6f1a81ceb18d09762b73 100644 (file)
@@ -461,7 +461,7 @@ channel_date (session *sess, char *chan, char *timestr,
 }
 
 static int
-trailing_index(const char *word_eol[])
+trailing_index(char *word_eol[])
 {
        int param_index;
        for (param_index = 3; param_index < PDIWORDS; ++param_index)
index fa0783d4de1ad2d80d26e4bba6d844c74b0e28fc..f06074fcd147e6cc42be2e953129dbb0c369115d 100644 (file)
@@ -1375,11 +1375,16 @@ str_sha256hash (char *string)
        int i;
        unsigned char hash[SHA256_DIGEST_LENGTH];
        char buf[SHA256_DIGEST_LENGTH * 2 + 1];         /* 64 digit hash + '\0' */
+
+#if OPENSSL_VERSION_NUMBER >= 0x30000000L
+       SHA256 (string, strlen (string), hash);
+#else
        SHA256_CTX sha256;
 
        SHA256_Init (&sha256);
        SHA256_Update (&sha256, string, strlen (string));
        SHA256_Final (hash, &sha256);
+#endif
 
        for (i = 0; i < SHA256_DIGEST_LENGTH; i++)
        {
index dc4b41bc7ad7636536702303c86fa05957e220a4..6dd16e356c053f46b7a2854bb632add0ab041bba 100644 (file)
@@ -894,7 +894,7 @@ key_save_kbs (void)
 #define STRIP_WHITESPACE \
        while (buf[0] == ' ' || buf[0] == '\t') \
                buf++; \
-               len = strlen (buf); \
+       len = strlen (buf); \
        while (buf[len] == ' ' || buf[len] == '\t') \
        { \
                buf[len] = 0; \
index 6a0fccbae07f1f737dd7b8bbf513cd47b4c5dd6a..08a5110afb7f40af818a80133ed2028455864e09 100644 (file)
@@ -947,7 +947,7 @@ gtk_xtext_find_char (GtkXText * xtext, int x, int y, int *off, int *out_of_bound
        textentry *ent;
        int line;
        int subline;
-       int outofbounds;
+       int outofbounds = FALSE;
 
        /* Adjust y value for negative rounding, double to int */
        if (y < 0)