From 427b46e80fa203ffbd5e1eba0d360bd5fd1c8dca Mon Sep 17 00:00:00 2001 From: giraffedata Date: Tue, 25 Sep 2018 03:36:21 +0000 Subject: cleanup, fix comment, fix compiler warning git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3339 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pamaltsat.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'editor/pamaltsat.c') diff --git a/editor/pamaltsat.c b/editor/pamaltsat.c index 64a099e4..6d9b91e0 100644 --- a/editor/pamaltsat.c +++ b/editor/pamaltsat.c @@ -41,7 +41,7 @@ methodFmNm(const char * const methodNm) { /*---------------------------------------------------------------------------- The method of saturation whose name is 'methodNm' -----------------------------------------------------------------------------*/ - uchar i; + uint i; bool found; Method method; @@ -56,6 +56,7 @@ methodFmNm(const char * const methodNm) { /* Issue error message and abort */ char * methodList; uint methodListLen; + uint i; /* Allocate a buffer to store the list of known saturation methods: */ for (i = 0, methodListLen = 0; i < ARRAY_SIZE(methodTable); ++i) @@ -65,7 +66,7 @@ methodFmNm(const char * const methodNm) { if (!methodList) pm_error("Failed to allocate memory for %lu saturation " - "method names", ARRAY_SIZE(methodTable)); + "method names", (unsigned long)ARRAY_SIZE(methodTable)); /* Fill the list of methods: */ for (i = 0, methodList[0] = '\0'; i < ARRAY_SIZE(methodTable); ++i) { @@ -409,7 +410,7 @@ saturateSpectrum(LinSampleInfo * const siP, /* To satisfy both constraints, choose the strictest: */ double const km = km1 > km2 ? km2 : km1; - /* Ensure the saturation factor does exceed the maximum + /* Ensure the saturation factor does not exceed the maximum possible value: */ k = sat < km ? sat : km; -- cgit 1.4.1