Last Comment Bug 739962 - fix -Wunused-but-set-variable warnings in content/
: fix -Wunused-but-set-variable warnings in content/
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Audio/Video (show other bugs)
: unspecified
: All Linux
: -- normal (vote)
: mozilla14
Assigned To: Nathan Froyd [:froydnj]
:
Mentors:
Depends on:
Blocks: buildwarning
  Show dependency treegraph
 
Reported: 2012-03-28 06:14 PDT by Nathan Froyd [:froydnj]
Modified: 2012-03-29 08:53 PDT (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch (7.40 KB, patch)
2012-03-28 06:15 PDT, Nathan Froyd [:froydnj]
no flags Details | Diff | Splinter Review
patch (7.37 KB, patch)
2012-03-28 06:23 PDT, Nathan Froyd [:froydnj]
bent.mozilla: review+
Details | Diff | Splinter Review

Description Nathan Froyd [:froydnj] 2012-03-28 06:14:59 PDT
/home/froydnj/src/m-c.git/content/base/src/nsContentUtils.cpp: In static member function 'static void nsContentUtils::InitializeModifierStrings()':
/home/froydnj/src/m-c.git/content/base/src/nsContentUtils.cpp:488:12: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
/home/froydnj/src/m-c.git/content/media/MediaResource.cpp: In member function 'void mozilla::MediaResource::MoveLoadsToBackground()':
/home/froydnj/src/m-c.git/content/media/MediaResource.cpp:1211:12: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
/home/froydnj/src/m-c.git/content/media/MediaResource.cpp: In member function 'void mozilla::MediaResource::ModifyLoadFlags(nsLoadFlags)':
/home/froydnj/src/m-c.git/content/media/MediaResource.cpp:1233:12: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
/home/froydnj/src/m-c.git/content/media/nsBuiltinDecoderStateMachine.cpp: In member function 'virtual void nsBuiltinDecoderStateMachine::StartBuffering()':
/home/froydnj/src/m-c.git/content/media/nsBuiltinDecoderStateMachine.cpp:2166:30: warning: variable 'stats' set but not used [-Wunused-but-set-variable]
/home/froydnj/src/m-c.git/content/media/ogg/nsOggReader.cpp: In member function 'nsresult nsOggReader::SeekBisection(PRInt64, const nsOggReader::SeekRange&, PRUint32)':
/home/froydnj/src/m-c.git/content/media/ogg/nsOggReader.cpp:1168:15: warning: variable 'previousGuess' set but not used [-Wunused-but-set-variable]
/home/froydnj/src/m-c.git/content/base/src/nsEventSource.cpp: In member function 'virtual nsresult nsEventSource::Observe(nsISupports*, const char*, const PRUnichar*)':
/home/froydnj/src/m-c.git/content/base/src/nsEventSource.cpp:470:12: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
/home/froydnj/src/m-c.git/content/xbl/src/nsXBLDocumentInfo.cpp: In member function 'void nsXBLDocGlobalObject::SetContext(nsIScriptContext*)':
/home/froydnj/src/m-c.git/content/xbl/src/nsXBLDocumentInfo.cpp:275:12: warning: variable 'rv' set but not used [-Wunused-but-set-variable]
Comment 1 Nathan Froyd [:froydnj] 2012-03-28 06:15:58 PDT
Created attachment 610107 [details] [diff] [review]
patch
Comment 2 :Ms2ger (⌚ UTC+1/+2) 2012-03-28 06:20:50 PDT
Comment on attachment 610107 [details] [diff] [review]
patch

Review of attachment 610107 [details] [diff] [review]:
-----------------------------------------------------------------

::: content/media/nsBuiltinDecoderStateMachine.cpp
@@ +2162,5 @@
>    UpdateReadyState();
>    mState = DECODER_STATE_BUFFERING;
>    LOG(PR_LOG_DEBUG, ("%p Changed state from DECODING to BUFFERING, decoded for %.3lfs",
>                       mDecoder.get(), decodeDuration.ToSeconds()));
> +  DebugOnly<nsMediaDecoder::Statistics> stats = mDecoder->GetStatistics();

You'll need an #ifdef that matches PR_LOG
Comment 3 Nathan Froyd [:froydnj] 2012-03-28 06:23:14 PDT
Created attachment 610110 [details] [diff] [review]
patch
Comment 4 Nathan Froyd [:froydnj] 2012-03-28 06:25:21 PDT
Comment on attachment 610110 [details] [diff] [review]
patch

Good point, now to get Bugzilla to behave...
Comment 5 Ben Turner (not reading bugmail, use the needinfo flag!) 2012-03-28 11:00:42 PDT
Comment on attachment 610110 [details] [diff] [review]
patch

r=me assuming this all compiles and such :)
Comment 7 Matt Brubeck (:mbrubeck) 2012-03-29 08:53:34 PDT
https://hg.mozilla.org/mozilla-central/rev/6654f183d214

Note You need to log in before you can comment on or make changes to this bug.