summaryrefslogtreecommitdiff
path: root/pngtest.c
diff options
context:
space:
mode:
authorCosmin Truta <ctruta@gmail.com>2018-08-18 21:01:02 -0400
committerCosmin Truta <ctruta@gmail.com>2018-08-18 21:01:02 -0400
commit1ef88828146c23bfc6d81042c6d6ecd61ccc983b (patch)
treede8eafd6a8c372f3bdb70a51ed799896bdc99c30 /pngtest.c
parent58eedced2578c143705c1d8503e4ed3a40aaa8b3 (diff)
downloadlibpng-1ef88828146c23bfc6d81042c6d6ecd61ccc983b.tar.gz
Replace the remaining uses of PNG_CONST with const
In v1.6.0, compiler support for const became a requirement. It should be used consistently. To maintain backwards compatibility, PNG_CONST is still maintained in deprecated form.
Diffstat (limited to 'pngtest.c')
-rw-r--r--pngtest.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/pngtest.c b/pngtest.c
index 887e7fe53..bec7e5133 100644
--- a/pngtest.c
+++ b/pngtest.c
@@ -449,13 +449,13 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, size_t length)
*/
typedef struct
{
- PNG_CONST char *file_name;
+ const char *file_name;
} pngtest_error_parameters;
static void PNGCBAPI
pngtest_warning(png_structp png_ptr, png_const_charp message)
{
- PNG_CONST char *name = "UNKNOWN (ERROR!)";
+ const char *name = "UNKNOWN (ERROR!)";
pngtest_error_parameters *test =
(pngtest_error_parameters*)png_get_error_ptr(png_ptr);
@@ -850,7 +850,7 @@ pngtest_check_text_support(png_structp png_ptr, png_textp text_ptr,
/* Test one file */
static int
-test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
+test_one_file(const char *inname, const char *outname)
{
static png_FILE_p fpin;
static png_FILE_p fpout; /* "static" prevents setjmp corruption */
@@ -1809,11 +1809,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
/* Input and output filenames */
#ifdef RISCOS
-static PNG_CONST char *inname = "pngtest/png";
-static PNG_CONST char *outname = "pngout/png";
+static const char *inname = "pngtest/png";
+static const char *outname = "pngout/png";
#else
-static PNG_CONST char *inname = "pngtest.png";
-static PNG_CONST char *outname = "pngout.png";
+static const char *inname = "pngtest.png";
+static const char *outname = "pngout.png";
#endif
int