Last Comment Bug 766577 - fix "octal literals and octal escape sequences are deprecated" in c-c
: fix "octal literals and octal escape sequences are deprecated" in c-c
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: All All
: -- normal (vote)
: Thunderbird 16.0
Assigned To: :aceman
:
:
Mentors:
Depends on: 572890 670566
Blocks: tb-noise
  Show dependency treegraph
 
Reported: 2012-06-20 08:30 PDT by :Irving Reid (No longer working on Firefox)
Modified: 2012-07-07 07:30 PDT (History)
7 users (show)
ryanvm: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch for TB (9.91 KB, patch)
2012-06-21 14:02 PDT, :aceman
mconley: review+
Details | Diff | Splinter Review
patch for Seamonkey (10.91 KB, patch)
2012-06-22 11:35 PDT, :aceman
neil: review+
Details | Diff | Splinter Review

Description User image :Irving Reid (No longer working on Firefox) 2012-06-20 08:30:51 PDT
+++ This bug was initially created as a clone of Bug #572890 +++

Since bug 514559, octal literals and octal escape sequences are deprecated in strict mode, resulting in warnings when starting Thunderbird (and possibly SeaMonkey)

JavaScript warning: chrome://messenger/content/folderPane.js, line 205: octal literals and octal escape sequences are deprecated
JavaScript warning: chrome://messenger/content/folderPane.js, line 205: octal literals and octal escape sequences are deprecated
JavaScript warning: chrome://messenger/content/folderPane.js, line 205: octal literals and octal escape sequences are deprecated
JavaScript warning: chrome://messenger/content/mailWindowOverlay.js, line 1386: octal literals and octal escape sequences are deprecated

While my most recent test run didn't give me warnings for these files, there are also octal literals in /mail/components/search/SpotlightIntegration.js and /mail/components/search/content/searchCommon.js (see https://bugzilla.mozilla.org/show_bug.cgi?id=670566#c55)
Comment 1 User image :aceman 2012-06-21 05:32:35 PDT
Can I take this?
Comment 2 User image :aceman 2012-06-21 14:02:17 PDT
Created attachment 635452 [details] [diff] [review]
patch for TB

All occurences I could find with a grep regex (/addressbook/* is already handled in a separate bug).

Does Seamonkey also want a global patch for all files?
Comment 3 User image Philip Chee 2012-06-21 18:59:39 PDT
> Does Seamonkey also want a global patch for all files?
But of course!!
Comment 4 User image :aceman 2012-06-22 11:35:37 PDT
Created attachment 635832 [details] [diff] [review]
patch for Seamonkey

Untested...
Comment 5 User image Ian Neal 2012-07-03 14:57:38 PDT
Comment on attachment 635832 [details] [diff] [review]
patch for Seamonkey

Not sure if this is the best way or not, Neil might though.
Comment 6 User image neil@parkwaycc.co.uk 2012-07-03 17:06:26 PDT
Comment on attachment 635832 [details] [diff] [review]
patch for Seamonkey

>-      foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0);
>+      foStream.init(file, 0x02 | 0x08 | 0x20, parseInt("0666", 8), 0);
In theory we could use -1 here instead (it is special-cased as 0664 in this one function).
Comment 7 User image Mike Conley (:mconley) 2012-07-05 12:58:58 PDT
Comment on attachment 635452 [details] [diff] [review]
patch for TB

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

This looks good to me too. Thanks for the cleanup, aceman!
Comment 8 User image :aceman 2012-07-06 02:03:04 PDT
(In reply to neil@parkwaycc.co.uk from comment #6)
> Comment on attachment 635832 [details] [diff] [review]
> patch for Seamonkey
> 
> >-      foStream.init(file, 0x02 | 0x08 | 0x20, 0666, 0);
> >+      foStream.init(file, 0x02 | 0x08 | 0x20, parseInt("0666", 8), 0);
> In theory we could use -1 here instead (it is special-cased as 0664 in this
> one function).

But the original permissions were 0666, so I didn't want to change them (even though they are probably unwanted to be world writable). The respestive module owners should fix the logic (perms) in their own patches.

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