From: Peter Simons Date: Tue, 21 Jul 2009 13:23:55 +0000 (+0200) Subject: tests-sha1: don't assign literal string to 'char *' variable X-Git-Tag: v0.1~5757 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=abc4e3f768914ecc82270adfccef5f3f7777ea98;p=gnulib.git tests-sha1: don't assign literal string to 'char *' variable * tests/test-sha1.c (main): Declare locals with "const" to match attributes of the right hand side. --- diff --git a/ChangeLog b/ChangeLog index 2bb96cfcb..718af87ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2009-07-22 Peter Simons + + tests-sha1: don't assign literal string to 'char *' variable + * tests/test-sha1.c (main): Declare locals with "const" to match + attributes of the right hand side. + 2009-07-21 Eric Blake dup2: fix more mingw problems diff --git a/tests/test-sha1.c b/tests/test-sha1.c index 0cfb30947..474213885 100644 --- a/tests/test-sha1.c +++ b/tests/test-sha1.c @@ -25,8 +25,8 @@ int main (int argc, char *argv[]) { - char *in1 = "abcdefgh"; - char *out1 = "\x42\x5a\xf1\x2a\x07\x43\x50\x2b" + const char *in1 = "abcdefgh"; + const char *out1 = "\x42\x5a\xf1\x2a\x07\x43\x50\x2b" "\x32\x2e\x93\xa0\x15\xbc\xf8\x68\xe3\x24\xd5\x6a"; char buf[SHA1_DIGEST_SIZE];