summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2016-04-07 18:52:10 +0200
committerDiego Biurrun <diego@biurrun.de>2016-04-29 16:21:23 +0200
commitf2422b58756ba97e3cbadc190f1ed950aa201ec7 (patch)
treebbc5cf5e0eb667b9ffc8329cd7e9a0e29ff0ff3b /libavutil
parent5b1409c75563b4a3aca113c34d09e3b5442de47f (diff)
testprogs: Mark some tables as static const
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/aes-test.c8
-rw-r--r--libavutil/avstring-test.c2
-rw-r--r--libavutil/crc-test.c2
-rw-r--r--libavutil/hmac-test.c16
-rw-r--r--libavutil/opt-test.c2
-rw-r--r--libavutil/sha-test.c2
-rw-r--r--libavutil/xtea-test.c2
7 files changed, 17 insertions, 17 deletions
diff --git a/libavutil/aes-test.c b/libavutil/aes-test.c
index 92404e4cc2..afb5ad3685 100644
--- a/libavutil/aes-test.c
+++ b/libavutil/aes-test.c
@@ -27,23 +27,23 @@ int main(int argc, char **argv)
{
int i, j;
AVAES b;
- uint8_t rkey[2][16] = {
+ static const uint8_t rkey[2][16] = {
{ 0 },
{ 0x10, 0xa5, 0x88, 0x69, 0xd7, 0x4b, 0xe5, 0xa3,
0x74, 0xcf, 0x86, 0x7c, 0xfb, 0x47, 0x38, 0x59 }
};
- uint8_t pt[16], rpt[2][16] = {
+ static const uint8_t rpt[2][16] = {
{ 0x6a, 0x84, 0x86, 0x7c, 0xd7, 0x7e, 0x12, 0xad,
0x07, 0xea, 0x1b, 0xe8, 0x95, 0xc5, 0x3f, 0xa3 },
{ 0 }
};
- uint8_t rct[2][16] = {
+ static const uint8_t rct[2][16] = {
{ 0x73, 0x22, 0x81, 0xc0, 0xa0, 0xaa, 0xb8, 0xf7,
0xa5, 0x4a, 0x0c, 0x67, 0xa0, 0xc4, 0x5e, 0xcf },
{ 0x6d, 0x25, 0x1e, 0x69, 0x44, 0xb0, 0x51, 0xe0,
0x4e, 0xaa, 0x6f, 0xb4, 0xdb, 0xf7, 0x84, 0x65 }
};
- uint8_t temp[16];
+ uint8_t pt[16], temp[16];
int err = 0;
av_log_set_level(AV_LOG_DEBUG);
diff --git a/libavutil/avstring-test.c b/libavutil/avstring-test.c
index 7732c22f0e..fc4f0a415e 100644
--- a/libavutil/avstring-test.c
+++ b/libavutil/avstring-test.c
@@ -25,7 +25,7 @@
int main(void)
{
int i;
- const char *strings[] = {
+ static const char *strings[] = {
"''",
"",
":",
diff --git a/libavutil/crc-test.c b/libavutil/crc-test.c
index 41601c5ed8..ef15fb5669 100644
--- a/libavutil/crc-test.c
+++ b/libavutil/crc-test.c
@@ -25,7 +25,7 @@ int main(void)
{
uint8_t buf[1999];
int i;
- int p[5][3] = {
+ static const int p[5][3] = {
{ AV_CRC_32_IEEE_LE, 0xEDB88320, 0x3D5CDD04 },
{ AV_CRC_32_IEEE, 0x04C11DB7, 0xC0F5BAE0 },
{ AV_CRC_16_ANSI_LE, 0xA001, 0xBFD8 },
diff --git a/libavutil/hmac-test.c b/libavutil/hmac-test.c
index fb6bf87cff..f97c8a6ab3 100644
--- a/libavutil/hmac-test.c
+++ b/libavutil/hmac-test.c
@@ -42,14 +42,14 @@ int main(void)
{
uint8_t key1[20], key3[131], data3[50];
enum AVHMACType i = AV_HMAC_SHA224;
- const uint8_t key2[] = "Jefe";
- const uint8_t data1[] = "Hi There";
- const uint8_t data2[] = "what do ya want for nothing?";
- const uint8_t data4[] = "Test Using Larger Than Block-Size Key - Hash Key First";
- const uint8_t data5[] = "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data";
- const uint8_t data6[] = "This is a test using a larger than block-size key and a larger "
- "than block-size data. The key needs to be hashed before being used"
- " by the HMAC algorithm.";
+ static const uint8_t key2[] = "Jefe";
+ static const uint8_t data1[] = "Hi There";
+ static const uint8_t data2[] = "what do ya want for nothing?";
+ static const uint8_t data4[] = "Test Using Larger Than Block-Size Key - Hash Key First";
+ static const uint8_t data5[] = "Test Using Larger Than Block-Size Key and Larger Than One Block-Size Data";
+ static const uint8_t data6[] = "This is a test using a larger than block-size key and a larger "
+ "than block-size data. The key needs to be hashed before being used"
+ " by the HMAC algorithm.";
AVHMAC *hmac = av_hmac_alloc(AV_HMAC_MD5);
if (!hmac)
return 1;
diff --git a/libavutil/opt-test.c b/libavutil/opt-test.c
index 14a144cb86..6262b77e5b 100644
--- a/libavutil/opt-test.c
+++ b/libavutil/opt-test.c
@@ -68,7 +68,7 @@ int main(void)
{
int i;
TestContext test_ctx = { .class = &test_class };
- const char *options[] = {
+ static const char *options[] = {
"",
":",
"=",
diff --git a/libavutil/sha-test.c b/libavutil/sha-test.c
index e43a5a53d5..5f62a98ea3 100644
--- a/libavutil/sha-test.c
+++ b/libavutil/sha-test.c
@@ -25,7 +25,7 @@ int main(void)
int i, j, k;
AVSHA ctx;
unsigned char digest[32];
- const int lengths[3] = { 160, 224, 256 };
+ static const int lengths[3] = { 160, 224, 256 };
for (j = 0; j < 3; j++) {
printf("Testing SHA-%d\n", lengths[j]);
diff --git a/libavutil/xtea-test.c b/libavutil/xtea-test.c
index f81cfdc3e8..98445760eb 100644
--- a/libavutil/xtea-test.c
+++ b/libavutil/xtea-test.c
@@ -83,7 +83,7 @@ int main(void)
AVXTEA ctx;
uint8_t buf[16], iv[8];
int i, j;
- const uint8_t src[32] = "HelloWorldHelloWorldHelloWorld";
+ static const uint8_t src[32] = "HelloWorldHelloWorldHelloWorld";
uint8_t ct[32];
uint8_t pl[32];