Skip to content

Commit 16ff66e

Browse files
committed
Eliminate warnings and other minor cleanups
1 parent 446450c commit 16ff66e

File tree

6 files changed

+6
-16
lines changed

6 files changed

+6
-16
lines changed

.github/workflows/c-cpp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/checkout@v4
1414

1515
- name: Install dependencies
16-
run: sudo apt-get update && sudo apt-get install libtiff-dev libpng-dev libturbojpeg-dev libwebp-dev libavif-dev libmemcached-dev libopenjp2-7-dev
16+
run: sudo apt-get update && sudo apt-get install libfcgi-dev libtiff-dev libpng-dev libturbojpeg-dev libwebp-dev libavif-dev libmemcached-dev libopenjp2-7-dev
1717

1818
- name: Configure
1919
run: |

configure.ac

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,6 @@ if test -n "$kakadu_path"; then
314314

315315
AC_SUBST(KAKADU_OBJS)
316316

317-
AC_LANG_PUSH([C++])
318-
AC_CHECK_HEADER([thread], [AC_DEFINE(HAVE_STL_THREAD)])
319-
AC_LANG_POP([C++])
320-
321317
AC_CHECK_FUNC([get_nprocs_conf],[AC_DEFINE(NPROCS)])
322318
fi
323319
else

src/JPEGImage.cc

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
along with this program. If not, see <http://www.gnu.org/licenses/>.
1717
*/
1818

19-
2019
#include "JPEGImage.h"
2120
#include "Logger.h"
2221
#include <cstdio>
@@ -476,8 +475,8 @@ void JPEGImage::process( unsigned int res, int layers, int xoffset, int yoffset,
476475
}
477476
}
478477

479-
// Free any temporary buffer we may have created
480-
if( dst_ptr ) free( dst_ptr );
478+
// Free temporary buffer we created for when factor > 1
479+
if( buffer ) free( buffer );
481480
}
482481

483482
}

src/TIFFCompressor.cc

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ extern "C" {
4141
tiff_mem *memtif = (tiff_mem *) handle;
4242

4343
// Re-allocate extra memory if we don't have enough space
44-
if( ((tsize_t) memtif->current + length) > memtif->capacity ){
44+
if( (memtif->current + length) > memtif->capacity ){
4545
memtif->capacity = memtif->capacity + length;
4646
memtif->buffer = (unsigned char*) realloc( memtif->buffer, memtif->capacity );
4747
}
@@ -94,11 +94,6 @@ extern "C" {
9494
static void _unmap( thandle_t handle, tdata_t base, toff_t psize ){
9595
}
9696

97-
// Free function - unimplemented as memory handled manually
98-
static void _free( tiff_mem *memtif ){
99-
return;
100-
}
101-
10297
}
10398

10499

src/TIFFCompressor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ typedef struct {
3333
unsigned char *buffer; /// Data buffer
3434
toff_t current; /// Current byte position within stream
3535
toff_t end; /// Last written byte
36-
tsize_t capacity; /// Allocated buffer size
36+
toff_t capacity; /// Allocated buffer size
3737
} tiff_mem;
3838

3939
typedef tiff_mem* tiff_mem_ptr;

src/Task.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ void QLT::run( Session* session, const string& argument ){
9999
transform( arg.begin(), arg.end(), arg.begin(), ::tolower );
100100

101101
// Check whether we have a compression:quality combination
102-
int delimitter = arg.find( ":" );
102+
std::string::size_type delimitter = arg.find( ":" );
103103
if( delimitter != string::npos ){
104104
string comp = arg.substr( 0, delimitter );
105105
int compression = 0;

0 commit comments

Comments
 (0)