Source: gambas2 Version: 2.22.0-1 Severity: serious Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu oneiric ubuntu-patch User: debian-...@lists.debian.org Usertags: ftbfs-gcc-4.6
Build log: make[5]: Entering directory `/tmp/buildd/gambas2-2.22.0/gb.db.firebird/src' /bin/bash ../libtool --tag=CXX --mode=compile ccache x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I./ibpp/core -pipe -Wall -fno-exceptions -Wno-unused-value -Wcast-align -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -fexceptions -MT gb_db_firebird_la-main.lo -MD -MP -MF .deps/gb_db_firebird_la-main.Tpo -c -o gb_db_firebird_la-main.lo `test -f 'main.cpp' || echo './'`main.cpp libtool: compile: ccache x86_64-linux-gnu-g++ -DHAVE_CONFIG_H -I. -I.. -I./ibpp/core -pipe -Wall -fno-exceptions -Wno-unused-value -Wcast-align -fsigned-char -fvisibility=hidden -g -Os -fno-omit-frame-pointer -fexceptions -MT gb_db_firebird_la-main.lo -MD -MP -MF .deps/gb_db_firebird_la-main.Tpo -c main.cpp -fPIC -DPIC -o .libs/gb_db_firebird_la-main.o main.cpp: In function 'int query_fill(DB_DATABASE*, DB_RESULT, int, GB_VARIANT_VALUE*, int)': main.cpp:1219:44: error: taking address of temporary [-fpermissive] main.cpp: In function 'int field_info(DB_DATABASE*, const char*, const char*, DB_FIELD*)': main.cpp:1903:48: error: taking address of temporary [-fpermissive] main.cpp:1905:36: error: taking address of temporary [-fpermissive] make[5]: *** [gb_db_firebird_la-main.lo] Error 1 Attaching the patch that I've applied to the Ubuntu package.
Description: Fix FTBFS with GCC 4.6 Author: Felix Geyer <debfx-...@fobos.de> --- gambas2-2.22.0.orig/gb.db.firebird/src/main.cpp +++ gambas2-2.22.0/gb.db.firebird/src/main.cpp @@ -1205,6 +1205,7 @@ static int query_fill(DB_DATABASE *db, D FBResult *res=(FBResult *)result; unsigned i; GB_VARIANT fantom; + GB_VARIANT variant; if(res->GetnRecord()>0){ for (i=0; i < res->Columns(); i++){ if(res->ColumnType(i+1)==IBPP::sdBlob){ @@ -1216,7 +1217,8 @@ static int query_fill(DB_DATABASE *db, D GB.StoreVariant(&fantom, &buffer[i]); } else{ - GB.StoreVariant(&res->GetData(pos,i), &buffer[i]); + variant = res->GetData(pos,i); + GB.StoreVariant(&variant, &buffer[i]); } } } @@ -1874,6 +1876,7 @@ static int field_info(DB_DATABASE *db, c static char query[SQLMAXLEN]; int type; std::string str1,str2; + GB_VARIANT variant; snprintf(query,SQLMAXLEN-1,"select b.RDB$field_name,a.RDB$field_type,b.rdb$null_flag,b.rdb$default_source,a.RDB$field_length from RDB$fields a,RDB$relation_fields b where a.RDB$field_name=b.RDB$field_source and b.RDB$relation_name=upper('%s') and b.rdb$field_name=upper('%s')",table,field); if (do_query(db, query, &res, "Unable to get the field from the table")){ delete res; @@ -1900,9 +1903,11 @@ static int field_info(DB_DATABASE *db, c str1=res->GetData(0,3).value.value._string; if(str1!="") str2=str1.assign(str1,8,str1.length()-8); - GB.FreeString(&res->GetData(0,3).value.value._string); + variant = res->GetData(0,3); + GB.FreeString(&variant.value.value._string); res->SetData(0,3,str2); - GB.StoreVariant(&res->GetData(0,3), &info->def); + variant = res->GetData(0,3); + GB.StoreVariant(&variant, &info->def); } delete res; return FALSE;