bugGnash - The GNU Flash player - Bugs: bug #41185, Get rid of warning (unused start...

 
 

bug #41185: Get rid of warning (unused start varible when NDEBUG is not defined)

Submitted by:  Petter Reinholdtsen <pere>
Submitted on:  Fri 10 Jan 2014 12:29:56 PM UTC  
 
Category:  core Severity:  3 - Normal
Release:  master Status:  Ready For Test
Privacy:  Public Assigned to:  Sandro Santilli <strk>
Open/Closed:  Open

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 10 Jan 2014 12:58:32 PM UTC, comment #1:

Pushed as 4b022b9, thanks

Sandro Santilli <strk>
Project MemberIn charge of this item.
Fri 10 Jan 2014 12:29:56 PM UTC, original submission:

While building gnash for coverity, I saw this warning:

CXX DefineBitsTag.lo
swf/DefineBitsTag.cpp: In function 'gnash::FileType gnash::SWF::{anonymous}::c\
heckFileType(gna
sh::SWFStream&)':
swf/DefineBitsTag.cpp:301:18: warning: unused variable 'start' [-Wunused-varia\
ble]
const size_t start = in.tell();
^
This fix should fix the problem:

diff --git a/libcore/swf/DefineBitsTag.cpp b/libcore/swf/DefineBitsTag.cpp
index a7c8b79..9967921 100644
--- a/libcore/swf/DefineBitsTag.cpp
+++ b/libcore/swf/DefineBitsTag.cpp
@@ -297,10 +297,6 @@ readDefineBitsJpeg(SWFStream& /*in*/, movie_definition& m\
)
FileType
checkFileType(SWFStream& in)
{
-#ifndef NDEBUG
- const size_t start = in.tell();
-#endif
-
const size_t bytes = 3;
char buf[bytes];

--
Happy hacking
Petter Reinholdtsen

Petter Reinholdtsen <pere>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by strk (Posted a comment)
  • -email is unavailable- added by pere (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2014-01-10 strk StatusNone => Ready For Test
        Assigned toNone => strk

    Back to the top


    Powered by Savane 3.3