Bug #940

Compilation warnings

Added by Ilya Gordeev almost 4 years ago. Updated over 2 years ago.

Status:ClosedStart date:25 Dec 2013
Priority:NormalDue date:
Assignee:Robin Mills% Done:

100%

Category:build
Target version:0.25

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 version Assigned 27 Dec 2013

Associated revisions

Revision 3214
Added by Robin Mills almost 4 years ago

Issue: #940. Fix compilation warnings.

Revision 3215
Added by Robin Mills almost 4 years ago

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

Revision 3220
Added by Robin Mills almost 4 years ago

Issue: #940. Fixed compilation warning in MinGW

History

#1 Updated by Robin Mills almost 4 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 Ilya Gordeev almost 4 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 4 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 4 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 4 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 2 years ago

  • % Done changed from 0 to 100

#7 Updated by Andreas Huggel over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF

Redmine Appliance - Powered by TurnKey Linux