ports/163286: [PATCH] multimedia/subtitleeditor doesn't compile with gcc 4.6
Heath Nielson
heathn at gmail.com
Wed Dec 14 15:50:09 UTC 2011
>Number: 163286
>Category: ports
>Synopsis: [PATCH] multimedia/subtitleeditor doesn't compile with gcc 4.6
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Dec 14 15:50:08 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Heath Nielson
>Release: FreeBSD 8.2-STABLE
>Organization:
>Environment:
FreeBSD hershey.bar.net 8.2-STABLE FreeBSD 8.2-STABLE #9: Mon Dec 12 20:31:44 MST 2011 heath at hershey.bar.net:/usr/obj/usr/src/sys/HERSHEY amd64
>Description:
Building the port with the gcc46 compiler gives the error:
sami.cc: In member function 'void Sami::read_subtitle(FileReader&)':
sami.cc:177:32: error: taking address of temporary [-fpermissive]
gmake[4]: *** [libsami_la-sami.lo] Error 1
>How-To-Repeat:
Using the ports/lang/gcc46 compiler.
cd /usr/ports/multimedia/subtitleeditor
make
(I'm not sure if the error occurs on previous versions of the gcc compiler.)
>Fix:
The original authors fixed this in their SVN repo (http://svn.gna.org/viewcvs/subtitleeditor/trunk/plugins/subtitleformats/sami/sami.cc?r1=772&r2=777).
Patch file is included which incorporates the change.
Patch attached with submission follows:
--- plugins/subtitleformats/sami/sami.cc.orig 2011-12-14 07:28:29.000000000 -0700
+++ plugins/subtitleformats/sami/sami.cc 2011-12-14 07:41:27.000000000 -0700
@@ -155,7 +155,7 @@
int state = 0;
Glib::ustring line;
Glib::ustring text;
- Subtitle* curSt;
+ Subtitle curSt;
char tmptext[MAXBUF+1] = "";
char *p = NULL, *q = NULL;
if (!file.getline(line))
@@ -174,8 +174,8 @@
start_sync = utility::string_to_int(inptr + 6);
// Get a line from the current subtitle on memory
- curSt = &subtitles.append();
- curSt->set_start(start_sync);
+ curSt = subtitles.append();
+ curSt.set_start(start_sync);
state = SAMI_STATE_SYNC_START;
continue;
@@ -239,14 +239,14 @@
// Now we are sure that this line is the end sync.
end_sync = utility::string_to_int(q + 6);
- curSt->set_end(end_sync);
+ curSt.set_end(end_sync);
*p = '\0';
trail_space(tmptext);
// finalize the end sync of current line
if (tmptext[0] != '\0')
- curSt->set_text(tmptext);
+ curSt.set_text(tmptext);
// an important check if this is end sync.
// Is there any delimiter " " in this line?
@@ -276,14 +276,14 @@
else
{
end_sync = SAMISYNC_MAXVAL;
- curSt->set_end(end_sync);
+ curSt.set_end(end_sync);
*p = '\0';
trail_space(tmptext);
// finalize the end sync of current line
if (tmptext[0] != '\0')
- curSt->set_text(tmptext);
+ curSt.set_text(tmptext);
state = SAMI_STATE_FORCE_QUIT;
break;
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list