Project

General

Profile

Bug #940

Compilation warnings

Added by Anonymous almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
build
Target version:
Start date:
25 Dec 2013
Due date:
% Done:

100%

Estimated time:

Description

Building exiv2-0.23 by gcc-4.8.2 I'v got this compilation warnings:
qxtbdb.h:76:96: warning: converting to non-pointer type ‘BerkeleyDB::u_int32_t {aka unsigned int}’ from NULL [-Wconversion-null]
qxtbdb.h:77:102: warning: converting to non-pointer type ‘BerkeleyDB::u_int32_t {aka unsigned int}’ from NULL [-Wconversion-null]


Related issues

Related to Exiv2 - Feature #941: Upgrade xmpsdk source to Adobe's current versionClosed27 Dec 2013

Actions

Associated revisions

Revision 3214 (diff)
Added by Robin Mills almost 8 years ago

Issue: #940. Fix compilation warnings.

Revision 3215 (diff)
Added by Robin Mills almost 8 years ago

Issue: #940. Changes to eliminate compiler warnings with GCC 4.8.1.2 on Linux.

Revision 3220 (diff)
Added by Robin Mills almost 8 years ago

Issue: #940. Fixed compilation warning in MinGW

History

#1

Updated by Robin Mills almost 8 years ago

  • Category set to build
  • Status changed from New to Assigned
  • Assignee set to Robin Mills
  • Priority changed from Low to Normal
  • Target version set to 0.25

Thanks for reporting this. Can you give me a little more information, please? qxtdb.h is not an Exiv2 file. On which platform are you building (Linux/Mac/Windows) , build system (./configure/CMake/Visual Studio)? Have you tried to build the trunk, or the 0.24 release?

I've installed 4.8.2 on Ubuntu/64 using apt-get install gcc 4.8 and built from the trunk. I'm a little surprised that it installed 4.8.1. I did try unsuccessfully to build GCC 4.8.2 from source on both Mac and Linux.

1070 rmills@rmills-mbp-kubuntu:~/gnu/exiv2/trunk $ g++ --version
g++ (Ubuntu 4.8.1-2ubuntu1~13.04) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

1071 rmills@rmills-mbp-kubuntu:~/gnu/exiv2/trunk $ 
I get a couple of unexpected warnings from futils.cpp and makernote.cpp
MD5.cpp: In function ‘void MD5Final(md5byte*, MD5_CTX*)’:
MD5.cpp:133:23: warning: argument to ‘sizeof’ in ‘void* memset(void*, int, size_t)’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
  memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */
                       ^
futils.cpp: In function ‘std::string Exiv2::strError()’:
futils.cpp:104:34: warning: ignoring return value of ‘char* strerror_r(int, char*, size_t)’, declared with attribute warn_unused_result [-Wunused-result]
         strerror_r(error, buf, n);
                                  ^
makernote.cpp:1027:20: warning: unused parameter ‘mnGroup’ [-Wunused-parameter]
     TiffComponent* newCasioMn(uint16_t    tag,
                    ^
makernote.cpp:1027:20: warning: unused parameter ‘byteOrder’ [-Wunused-parameter]

Robin

#2

Updated by Anonymous almost 8 years ago

I'm so sorry! It's message from another build log. Here it is right messages I wanted to report:

MD5.cpp:133:23: warning: argument to ‘sizeof’ in ‘void* memset(void*, int, size_t)’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]
MD5.cpp:133:23: warning: argument to ‘sizeof’ in ‘void* memset(void*, int, size_t)’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess]

But you'v got it yourself. Once again, my apologies for my misleading report!

#3

Updated by Robin Mills almost 8 years ago

I've submitted a fix for the warnings - r3214. I did this work on the Mac and might need to submit additional changes for Linux and/or Windows (Visual Studio, Cygwin, MinGW).

Most of the warnings come from xmpsdk/src and normally I wouldn't touch that code. I downloaded the latest version from Adobe today and I can see it has changed a lot. Time for us to refresh that code, however I don't have time to undertake that at the moment. So, I've opened a feature request to adopt the latest xmpsdk.

Robin

#4

Updated by Robin Mills almost 8 years ago

  • Status changed from Assigned to Resolved

r3219 has been successfully built and tested with Mac (clang) (./configure and CMake), Linux (GCC 4.7,4.8.1, clang) (./configure and CMake) and Visual Studio 2003/win32 2005/x64.

#5

Updated by Robin Mills almost 8 years ago

r3220 fixes warnings in MinGW (using GCC 4.7.3).
r3222 fixes warnings in Cygwin (using GCC 4.6.2).

Issue: #941 is the feature request to upgrade the code in xmpsdk and Andreas has described this as a "difficult project". I'm not going to predict when this might get done. For the moment we appear to be warning free on all platforms and build systems using default compilers.

Robin

#6

Updated by Robin Mills over 6 years ago

  • % Done changed from 0 to 100
#7

Updated by Andreas Huggel over 6 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF