Skip to content

Commit 6f80c7c

Browse files
committed
suppress unused _setException() return value
1 parent bf48fc2 commit 6f80c7c

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

Modules/_hashopenssl.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ EVP_hash(EVPobject *self, const void *vp, Py_ssize_t len)
481481
else
482482
process = Py_SAFE_DOWNCAST(len, Py_ssize_t, unsigned int);
483483
if (!EVP_DigestUpdate(self->ctx, (const void*)cp, process)) {
484-
_setException(PyExc_ValueError, NULL);
484+
(void)_setException(PyExc_ValueError, NULL);
485485
return -1;
486486
}
487487
len -= process;
@@ -1586,7 +1586,7 @@ _hashlib_hmac_new_impl(PyObject *module, Py_buffer *key, PyObject *msg_obj,
15861586
NULL /*impl*/);
15871587
PY_EVP_MD_free(digest);
15881588
if (r == 0) {
1589-
_setException(PyExc_ValueError, NULL);
1589+
(void)_setException(PyExc_ValueError, NULL);
15901590
goto error;
15911591
}
15921592

@@ -1630,13 +1630,13 @@ _hmac_digest_size(HMACobject *self)
16301630
{
16311631
const EVP_MD *md = HMAC_CTX_get_md(self->ctx);
16321632
if (md == NULL) {
1633-
_setException(PyExc_ValueError, NULL);
1633+
(void)_setException(PyExc_ValueError, NULL);
16341634
return 0;
16351635
}
16361636
unsigned int digest_size = EVP_MD_size(md);
16371637
assert(digest_size <= EVP_MAX_MD_SIZE);
16381638
if (digest_size == 0) {
1639-
_setException(PyExc_ValueError, NULL);
1639+
(void)_setException(PyExc_ValueError, NULL);
16401640
}
16411641
return digest_size;
16421642
}
@@ -1665,7 +1665,7 @@ _hmac_update(HMACobject *self, PyObject *obj)
16651665
PyBuffer_Release(&view);
16661666

16671667
if (r == 0) {
1668-
_setException(PyExc_ValueError, NULL);
1668+
(void)_setException(PyExc_ValueError, NULL);
16691669
return 0;
16701670
}
16711671
return 1;
@@ -1759,13 +1759,13 @@ _hmac_digest(HMACobject *self, unsigned char *buf, unsigned int len)
17591759
return 0;
17601760
}
17611761
if (!locked_HMAC_CTX_copy(temp_ctx, self)) {
1762-
_setException(PyExc_ValueError, NULL);
1762+
(void)_setException(PyExc_ValueError, NULL);
17631763
return 0;
17641764
}
17651765
int r = HMAC_Final(temp_ctx, buf, &len);
17661766
HMAC_CTX_free(temp_ctx);
17671767
if (r == 0) {
1768-
_setException(PyExc_ValueError, NULL);
1768+
(void)_setException(PyExc_ValueError, NULL);
17691769
return 0;
17701770
}
17711771
return 1;
@@ -1997,7 +1997,7 @@ _hashlib_get_fips_mode_impl(PyObject *module)
19971997
// But 0 is also a valid result value.
19981998
unsigned long errcode = ERR_peek_last_error();
19991999
if (errcode) {
2000-
_setException(PyExc_ValueError, NULL);
2000+
(void)_setException(PyExc_ValueError, NULL);
20012001
return -1;
20022002
}
20032003
}

0 commit comments

Comments
 (0)