Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 375755 - [PATCH] media-gfx/darktable fail to build with gcc-4.6
Summary: [PATCH] media-gfx/darktable fail to build with gcc-4.6
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Dane Smith (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: gcc-4.6
  Show dependency tree
 
Reported: 2011-07-20 11:09 UTC by Francesco Riosa
Modified: 2011-07-21 08:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francesco Riosa 2011-07-20 11:09:28 UTC
media-gfx/darktable compile with Werror enabled, as such it fail with a "set but not used" warning.

BTW: the bug will not be hit if USE=gconf is enabled

the patch make some use of the variable

--- darktable-0.9.orig//src/control/conf.h      2011-07-02 05:15:32.000000000 +0200
+++ darktable-0.9/src/control/conf.h    2011-07-20 12:57:20.395675131 +0200
@@ -278,7 +278,7 @@
   {
     read = fscanf(f, "%[^\n]\n", line);
     char *c = line;
-    while(*c != '=' && c < line + strlen(line)) c++;
+    while(read > 0 && *c != '=' && c < line + strlen(line)) c++;
     if(*c == '=')
     {
       *c = '\0';



[ 32%] Building CXX object src/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/RawImageDataFloat.cpp.o                                                  
[ 32%] Building CXX object src/rawspeed/CMakeFiles/rawspeed.dir/RawSpeed/SrwDecoder.cpp.o                                                         
Linking CXX static library librawspeed.a                                                                                                          
[ 32%] Built target rawspeed                                                                                                                      
[ 32%] Generating preferences_gen.h
Scanning dependencies of target lib_darktable                                                                                                     
[ 33%] [ 33%] Building C object src/CMakeFiles/lib_darktable.dir/metadata_gen.c.o                                                                 
Building C object src/CMakeFiles/lib_darktable.dir/common/collection.c.o                                                                          
[ 34%] Building C object src/CMakeFiles/lib_darktable.dir/common/colorlabels.c.o                                                                  
In file included from /var/tmp/portage/media-gfx/darktable-0.9/work/darktable-0.9/src/common/collection.c:25:0:                                   
/var/tmp/portage/media-gfx/darktable-0.9/work/darktable-0.9/src/control/conf.h: In function ‘dt_conf_init’:
/var/tmp/portage/media-gfx/darktable-0.9/work/darktable-0.9/src/control/conf.h:268:7: error: variable ‘read’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

make[2]: *** [src/CMakeFiles/lib_darktable.dir/common/collection.c.o] Errore 1
make[2]: *** Attesa dei processi non terminati....
In file included from /var/tmp/portage/media-gfx/darktable-0.9/work/darktable-0.9/src/common/colorlabels.c:22:0:
/var/tmp/portage/media-gfx/darktable-0.9/work/darktable-0.9/src/control/conf.h: In function ‘dt_conf_init’:
/var/tmp/portage/media-gfx/darktable-0.9/work/darktable-0.9/src/control/conf.h:268:7: error: variable ‘read’ set but not used [-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

make[2]: *** [src/CMakeFiles/lib_darktable.dir/common/colorlabels.c.o] Errore 1
make[1]: *** [src/CMakeFiles/lib_darktable.dir/all] Errore 2
make: *** [all] Errore 2
 * ERROR: media-gfx/darktable-0.9 failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of 'emerge --info =media-gfx/darktable-0.9',
 * the complete build log and the output of 'emerge -pqv =media-gfx/darktable-0.9'.
 * The complete build log is located at '/var/log/portage/build/media-gfx/darktable-0.9:20110720-094956.log.gz'.
 * The ebuild environment file is located at '/var/tmp/portage/media-gfx/darktable-0.9/temp/environment'.
 * S: '/var/tmp/portage/media-gfx/darktable-0.9/work/darktable-0.9'
Comment 1 Tim Harder gentoo-dev 2011-07-21 08:55:28 UTC
Fixed in the latest revision in CVS.