Closed
Bug 1445220
Opened 7 years ago
Closed 7 years ago
Saiz::Parse(Box& aBox): Value stored to 'version' during its initialization is never read
Categories
(Core :: Audio/Video: Playback, defect, P3)
Core
Audio/Video: Playback
Tracking
()
RESOLVED
FIXED
mozilla61
Tracking | Status | |
---|---|---|
firefox61 | --- | fixed |
People
(Reporter: Sylvestre, Assigned: cubouyaka, Mentored)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
mozbugz
:
review-
Sylvestre
:
feedback+
|
Details | Diff | Splinter Review |
http://sylvestre.ledru.info/reports/fx-scan-build/report-MoofParser.cpp-Parse-5-1.html#EndPath
Seems that the version variable is useless.
Reported for a potential new contributor.
Updated•7 years ago
|
Priority: -- → P3
Reporter | ||
Updated•7 years ago
|
Assignee: nobody → cubouyaka
Attachment #8964523 -
Flags: review?(sledru)
Reporter | ||
Comment 3•7 years ago
|
||
I had the impression that the version variable is not even used?
Flags: needinfo?(cubouyaka)
Reporter | ||
Updated•7 years ago
|
Attachment #8964523 -
Flags: review?(sledru)
Attachment #8964523 -
Attachment is obsolete: true
Flags: needinfo?(cubouyaka)
Attachment #8966194 -
Flags: review?(sledru)
Reporter | ||
Comment 5•7 years ago
|
||
Comment on attachment 8966194 [details] [diff] [review]
patch : unused variable 'version' deleted
Looks good.
Now, you should fix a reviewer for this:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Introduction#Step_4_Get_your_code_reviewed
Attachment #8966194 -
Flags: review?(sledru) → feedback+
Reporter | ||
Comment 6•7 years ago
|
||
Comment on attachment 8966194 [details] [diff] [review]
patch : unused variable 'version' deleted
Actually, your patch is incorrect. it is built upon the previous one.
The patch should be built from the up to date m-c tree.
Attachment #8966194 -
Flags: feedback+ → feedback-
I'm not sure to understand what you mean.. I tried to pull changes (hg pull), then I deleted the unused variable 'version' then I commited (hg commit -m "...") and then I created my patch (hg export . > my-change.patch) and this is the patch I asked for a review.
Now when I'm trying to pull (hg pull) it says that I'm up to date, and when I'm looking into the file dom/media/mp4/MoofParser.cpp line 933 the variable 'version' isn't here anymore so I don't know if my patch has been reviewed or if it's because I have local commit ? (I tried to removed it with hg commit --amend but it doesn't do anything ..)
Thanks for your help.
Reporter | ||
Comment 8•7 years ago
|
||
Your patch should contain:
- uint8_t version = flags >> 24;
Currently, you have two patches doing:
- uint8_t version = flags >> 24;
+ uint8_t version;
and
- uint8_t version;
is it more clear?
Ok yes it's what I understood before but my problem now is that I cann't find any way to have the previous version : I tried to delete the file and then do "hg update --clean" to have the current version of the file but in this new file I still don't have the variable as if I already deleted it.
So my question is : can I have back the current version of the file (without my changes) without downloading everything again ?
Like if I had done nothing yet.
Because now I don't have anything to change in the file because the variable is not there anymore ..
Reporter | ||
Comment 10•7 years ago
|
||
sorry :)
A few commands:
"hg wip" will give you the tree state
"hg histedit" (like git rebase -i) will give you the opportunity to fold the two patches into one.
"hg strip -r <revision>" drop the change
Hope this helps
Assignee | ||
Comment 11•7 years ago
|
||
Ok so now I can see that in the tree I made two patchs so I understand that I have to delete one or like merge them together but I'm trying to do that but I don't find how .. And I have an error when I try "hg histedit -o" (abandon : cannot edit history that contains merges)
Any easy way (in my opinion) to do is to restart everything from zero, just like I never did anything, any patch, any changes, but I'm not able to do that, I tried to purge everything, but it's still doesn't work ..
Reporter | ||
Comment 12•7 years ago
|
||
you probably need to rebase:
hg rebase -s <revision source aka your local changes> -d <the top of the official tree>
you can get the revisions using "hg wip"
Assignee | ||
Comment 13•7 years ago
|
||
Ok I think I managed to correct the bug (just deleted the unused variable 'version') and made only one patch.
Attachment #8966194 -
Attachment is obsolete: true
Attachment #8966989 -
Flags: review?(sledru)
Reporter | ||
Comment 14•7 years ago
|
||
Comment on attachment 8966989 [details] [diff] [review]
Bug 1445220 - I erased the initialisation of the variable 'version' and make a single patch for it
Good, you should now look for a reviewer.
Attachment #8966989 -
Flags: review?(sledru) → feedback+
Assignee | ||
Comment 15•7 years ago
|
||
I tried to find a reviewer by looking who change the function where I made my change with "hg blame -u" but I cannot select people that I found because they have not logged in to Bugzilla within the last 60 days... And it's the same for all users I tried.. How can I do ? Can I find a reviewer in an other way ?
Attachment #8966989 -
Flags: review?(gsquelart)
Attachment #8966989 -
Flags: review?(gsquelart) → review+
Comment on attachment 8966989 [details] [diff] [review]
Bug 1445220 - I erased the initialisation of the variable 'version' and make a single patch for it
Review of attachment 8966989 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry, I only reviewed your code previously.
But we want the whole patch to be ready to land in Firefox, and I think its commit description should be updated.
Currently it only says what you've done in the code (good!), and something about patches which is not interesting to keep in the patch itself.
I would suggest you change the commit description, by using e.g.: `hg commit --amend`.
Ideally the description should tell us what you've done but also very importantly *why* you've done it. In this case, it could be as simple as "Removed unused variable" (what=removed var, why=unused) ;-)
Please re-submit the patch with the new description and I'll be happy to give 'r+' again.
In the meantime, the code looked fine so I've started the next step:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Introduction#Step_6_Getting_code_into_the_tree
I assume you don't have 'try' access, so I pushed your patch on your behalf; you can see its progress there:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=a4c21556b4874475d398142111e64648a665d0d7
I'm pretty sure this will succeed, so we're very close to getting your code into Firefox!
Attachment #8966989 -
Flags: review+ → review-
Reporter | ||
Comment 17•7 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/19f68300761ed2d550be280215da2103fa39a629
Bug 1445220 - Removed 'version' variable declaration as it was unused r=gerald
Reporter | ||
Comment 18•7 years ago
|
||
I pushed it with a proper comment to close the loop here after 11 days on inactivity!
Comment 19•7 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Thank you Sylvestre.
Was I too harsh?
Reporter | ||
Comment 21•7 years ago
|
||
Not at all, this is just that it has been reported a month and half ago, I am going on pto for a week and was clearing my backlog :)
merci!
Assignee | ||
Comment 22•7 years ago
|
||
Sorry, I didn't have access on my computer for severals days...
Thank you Sylvestre.
Reporter | ||
Comment 23•7 years ago
|
||
No worries, bravo for your first patch, it is not in nightly
(In reply to Sylvestre Ledru [:sylvestre] [back May 7th] from comment #23)
> No worries, bravo for your first patch, it is not in nightly
I think you mean it is *now* in nightly. ;-)
(I make the same typo all the time -- let's blame auto-correct)
And welcome to the party, cubouyaka!
You need to log in
before you can comment on or make changes to this bug.
Description
•