summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
Diffstat (limited to 'demos')
-rw-r--r--demos/cipher/aesccm.c4
-rw-r--r--demos/cipher/aesgcm.c4
-rw-r--r--demos/cipher/aeskeywrap.c4
-rw-r--r--demos/cipher/ariacbc.c4
-rw-r--r--demos/digest/EVP_MD_demo.c6
-rw-r--r--demos/digest/EVP_MD_xof.c2
-rw-r--r--demos/guide/quic-client-non-block.c2
-rw-r--r--demos/guide/tls-client-non-block.c2
-rw-r--r--demos/pkey/EVP_PKEY_DSA_paramvalidate.c4
9 files changed, 16 insertions, 16 deletions
diff --git a/demos/cipher/aesccm.c b/demos/cipher/aesccm.c
index 49a054f9d3..e8fdbee7c8 100644
--- a/demos/cipher/aesccm.c
+++ b/demos/cipher/aesccm.c
@@ -64,8 +64,8 @@ static const unsigned char ccm_tag[] = {
* algorithm implementations. If they are NULL then the default library
* context and properties are used.
*/
-OSSL_LIB_CTX *libctx = NULL;
-const char *propq = NULL;
+static OSSL_LIB_CTX *libctx = NULL;
+static const char *propq = NULL;
static int aes_ccm_encrypt(void)
diff --git a/demos/cipher/aesgcm.c b/demos/cipher/aesgcm.c
index 40465b269c..f5011b8136 100644
--- a/demos/cipher/aesgcm.c
+++ b/demos/cipher/aesgcm.c
@@ -64,8 +64,8 @@ static const unsigned char gcm_tag[] = {
* algorithm implementations. If they are NULL then the default library
* context and properties are used.
*/
-OSSL_LIB_CTX *libctx = NULL;
-const char *propq = NULL;
+static OSSL_LIB_CTX *libctx = NULL;
+static const char *propq = NULL;
static int aes_gcm_encrypt(void)
{
diff --git a/demos/cipher/aeskeywrap.c b/demos/cipher/aeskeywrap.c
index 4d5df4cd98..e1fe9307b4 100644
--- a/demos/cipher/aeskeywrap.c
+++ b/demos/cipher/aeskeywrap.c
@@ -50,8 +50,8 @@ static const unsigned char wrap_ct[] = {
* algorithm implementations. If they are NULL then the default library
* context and properties are used.
*/
-OSSL_LIB_CTX *libctx = NULL;
-const char *propq = NULL;
+static OSSL_LIB_CTX *libctx = NULL;
+static const char *propq = NULL;
static int aes_wrap_encrypt(void)
{
diff --git a/demos/cipher/ariacbc.c b/demos/cipher/ariacbc.c
index 73605d2d6c..4492c46466 100644
--- a/demos/cipher/ariacbc.c
+++ b/demos/cipher/ariacbc.c
@@ -49,8 +49,8 @@ static const unsigned char cbc_ct[] = {
* algorithm implementations. If they are NULL then the default library
* context and properties are used.
*/
-OSSL_LIB_CTX *libctx = NULL;
-const char *propq = NULL;
+static OSSL_LIB_CTX *libctx = NULL;
+static const char *propq = NULL;
static int aria_cbc_encrypt(void)
{
diff --git a/demos/digest/EVP_MD_demo.c b/demos/digest/EVP_MD_demo.c
index 3a1f0c7ba0..64d0ec4ef8 100644
--- a/demos/digest/EVP_MD_demo.c
+++ b/demos/digest/EVP_MD_demo.c
@@ -24,7 +24,7 @@
* more than once.
*/
-const char *hamlet_1 =
+static const char *hamlet_1 =
"To be, or not to be, that is the question,\n"
"Whether tis nobler in the minde to suffer\n"
"The ſlings and arrowes of outragious fortune,\n"
@@ -43,7 +43,7 @@ const char *hamlet_1 =
"The oppressor's wrong, the proud man's Contumely,\n"
"The pangs of dispised love, the Law's delay,\n"
;
-const char *hamlet_2 =
+static const char *hamlet_2 =
"The insolence of Office, and the spurns\n"
"That patient merit of the'unworthy takes,\n"
"When he himself might his Quietas make\n"
@@ -65,7 +65,7 @@ const char *hamlet_2 =
;
/* The known value of the SHA3-512 digest of the above soliloqy */
-const unsigned char known_answer[] = {
+static const unsigned char known_answer[] = {
0xbb, 0x69, 0xf8, 0x09, 0x9c, 0x2e, 0x00, 0x3d,
0xa4, 0x29, 0x5f, 0x59, 0x4b, 0x89, 0xe4, 0xd9,
0xdb, 0xa2, 0xe5, 0xaf, 0xa5, 0x87, 0x73, 0x9d,
diff --git a/demos/digest/EVP_MD_xof.c b/demos/digest/EVP_MD_xof.c
index 9635e4539f..6fe8afd65f 100644
--- a/demos/digest/EVP_MD_xof.c
+++ b/demos/digest/EVP_MD_xof.c
@@ -27,7 +27,7 @@
*/
/* Our input to the XOF hash function. */
-const char message[] = "This is a test message.";
+static const char message[] = "This is a test message.";
/* Expected output when an output length of 20 bytes is used. */
static const unsigned char known_answer[] = {
diff --git a/demos/guide/quic-client-non-block.c b/demos/guide/quic-client-non-block.c
index a6c1802fcd..bf79b7fef1 100644
--- a/demos/guide/quic-client-non-block.c
+++ b/demos/guide/quic-client-non-block.c
@@ -231,7 +231,7 @@ int main(int argc, char *argv[])
unsigned char alpn[] = { 8, 'h', 't', 't', 'p', '/', '1', '.', '0' };
const char *request_start = "GET / HTTP/1.0\r\nConnection: close\r\nHost: ";
const char *request_end = "\r\n\r\n";
- size_t written, readbytes;
+ size_t written, readbytes = 0;
char buf[160];
BIO_ADDR *peer_addr = NULL;
int eof = 0;
diff --git a/demos/guide/tls-client-non-block.c b/demos/guide/tls-client-non-block.c
index 0b19d67762..05f1a11eb7 100644
--- a/demos/guide/tls-client-non-block.c
+++ b/demos/guide/tls-client-non-block.c
@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
int ret;
const char *request_start = "GET / HTTP/1.0\r\nConnection: close\r\nHost: ";
const char *request_end = "\r\n\r\n";
- size_t written, readbytes;
+ size_t written, readbytes = 0;
char buf[160];
int eof = 0;
char *hostname, *port;
diff --git a/demos/pkey/EVP_PKEY_DSA_paramvalidate.c b/demos/pkey/EVP_PKEY_DSA_paramvalidate.c
index a56c147869..c909045f2a 100644
--- a/demos/pkey/EVP_PKEY_DSA_paramvalidate.c
+++ b/demos/pkey/EVP_PKEY_DSA_paramvalidate.c
@@ -47,8 +47,8 @@ static const char hexseed[] =
"cba30ccd905aa7675a0b81769704bf3c"
"ccf2ca1892b2eaf6b9e2b38d9bf6affc"
"42ada55986d8a1772b442770954d0b65";
-const int gindex = 42;
-const int pcounter = 363;
+static const int gindex = 42;
+static const int pcounter = 363;
static const char digest[] = "SHA384";
/*