Last Comment Bug 339091 - More JS strict warnings
: More JS strict warnings
Status: RESOLVED FIXED
: fixed1.8.0.5, fixed1.8.1
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: -- trivial (vote)
: ---
Assigned To: Allan Beaufour
: Stephen Pride
Mentors:
http://www.w3.org/TR/xforms/
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-24 04:43 PDT by Allan Beaufour
Modified: 2016-07-15 14:46 PDT (History)
3 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Patch (2.06 KB, patch)
2006-05-24 04:56 PDT, Allan Beaufour
bugs: review+
Details | Diff | Splinter Review

Description Allan Beaufour 2006-05-24 04:43:42 PDT
Warning: test for equality (==) mistyped as assignment (=)?
Source File: chrome://xforms/content/input-xhtml.xml
Line: 345, Column: 48
Source Code:
                while (child = walker.nextNode()) {

Warning: function getDaysCount does not always return a value
Source File: chrome://xforms/content/widgets.xml
Line: 244, Column: 7
Comment 1 Allan Beaufour 2006-05-24 04:56:23 PDT
Created attachment 223168 [details] [diff] [review]
Patch

I'm a bit unsure about the "return 0". We could throw an error or something? But we have no generic mechanism in place for that now, do we?
Comment 2 Olli Pettay [:smaug] 2006-05-25 10:06:10 PDT
Comment on attachment 223168 [details] [diff] [review]
Patch

IMO, it is ok to return 0.
Comment 3 alexander :surkov 2006-05-26 01:48:10 PDT
(In reply to comment #0)
> Warning: test for equality (==) mistyped as assignment (=)?
> Source File: chrome://xforms/content/input-xhtml.xml
> Line: 345, Column: 48
> Source Code:
>                 while (child = walker.nextNode()) {
> 

It's not bug. Probably we should do some changes in syntacsis to avoid that warning.

> Warning: function getDaysCount does not always return a value
> Source File: chrome://xforms/content/widgets.xml
> Line: 244, Column: 7
> 

As you said we can return 0. In any case it's not matter because the value of calendar is setted by using 'value' property and that property can't lead to error month values I guess.
Comment 4 Allan Beaufour 2006-05-26 01:51:08 PDT
(In reply to comment #3)
> (In reply to comment #0)
> > Warning: test for equality (==) mistyped as assignment (=)?
> > Source File: chrome://xforms/content/input-xhtml.xml
> > Line: 345, Column: 48
> > Source Code:
> >                 while (child = walker.nextNode()) {
> > 
> 
> It's not bug. Probably we should do some changes in syntacsis to avoid that
> warning.

That is what the patch does ;-)
Comment 5 alexander :surkov 2006-05-26 01:52:22 PDT
Comment on attachment 223168 [details] [diff] [review]
Patch


>           }
>+          // XXX: throw error?
>+          return 0;

I guess we don't need in XXX comment. We report about error by returning zero value.
Comment 6 alexander :surkov 2006-05-26 01:54:38 PDT
(In reply to comment #4)

> 
> That is what the patch does ;-)
> 

Yes :)), I didn't look at it. I like the patch excepting XXX comment.
Comment 7 Allan Beaufour 2006-05-26 01:55:40 PDT
(In reply to comment #6)
> (In reply to comment #4)
> 
> > 
> > That is what the patch does ;-)
> > 
> 
> Yes :)), I didn't look at it. I like the patch excepting XXX comment.

:) Fixed on trunk.

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