Import zlib 1.2.8 with local change merged in.
[deliverable/binutils-gdb.git] / zlib / test / example.c
index f515a4853d6f09d4071d2381b6c7cc79fec2245a..138a699bd53e60250b3eed61e631175ef0452630 100644 (file)
@@ -26,7 +26,7 @@
     } \
 }
 
-const char hello[] = "hello, hello!";
+z_const char hello[] = "hello, hello!";
 /* "hello world" would be more standard, but the repeated "hello"
  * stresses the compression code better, sorry...
  */
@@ -212,7 +212,7 @@ void test_deflate(compr, comprLen)
     err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
     CHECK_ERR(err, "deflateInit");
 
-    c_stream.next_in  = (Bytef*)hello;
+    c_stream.next_in  = (z_const unsigned char *)hello;
     c_stream.next_out = compr;
 
     while (c_stream.total_in != len && c_stream.total_out < comprLen) {
@@ -387,7 +387,7 @@ void test_flush(compr, comprLen)
     err = deflateInit(&c_stream, Z_DEFAULT_COMPRESSION);
     CHECK_ERR(err, "deflateInit");
 
-    c_stream.next_in  = (Bytef*)hello;
+    c_stream.next_in  = (z_const unsigned char *)hello;
     c_stream.next_out = compr;
     c_stream.avail_in = 3;
     c_stream.avail_out = (uInt)*comprLen;
@@ -476,7 +476,7 @@ void test_dict_deflate(compr, comprLen)
     c_stream.next_out = compr;
     c_stream.avail_out = (uInt)comprLen;
 
-    c_stream.next_in = (Bytef*)hello;
+    c_stream.next_in = (z_const unsigned char *)hello;
     c_stream.avail_in = (uInt)strlen(hello)+1;
 
     err = deflate(&c_stream, Z_FINISH);
This page took 0.029775 seconds and 4 git commands to generate.