Opened 8 years ago

Closed 8 years ago

#13668 closed Bug (fixed)

CKBuilder shows warnings when creating CKEditor package: WARNING - unreachable code

Reported by: Wiktor Walc Owned by: Tade0
Priority: Normal Milestone: CKEditor 4.5.4
Component: General Version: 4.5.3
Keywords: Cc:

Description (last modified by Wiktor Walc)

Steps to reproduce

  1. Run ckbuilder to create CKEditor full package.

Note: you must use at least CKBuilder 2.3 in order to see errors.

Expected result

No warnings should be thrown.

Actual result

Unreachable code is detected.

Other details (browser, OS, CKEditor version, installed plugins)

Change History (5)

comment:1 Changed 8 years ago by Wiktor Walc

Description: modified (diff)
Milestone: CKEditor 4.5.4
Status: newconfirmed

comment:2 Changed 8 years ago by Wiktor Walc

Description: modified (diff)

comment:3 Changed 8 years ago by Tade0

Owner: set to Tade0
Status: confirmedassigned

comment:4 Changed 8 years ago by Tade0

Status: assignedreview

Found one more instance in:

and removed it.

I'm still getting this warning though:

WARNING: find.js:12: WARNING - unreachable code
for(var c=0;c<a.length;c++)for(d.push(d[c]+1);0<d[c+1]&&a.charAt(c)!=a.charAt(d[c+1]-1);)d[c+1]=d[d[c+1]-1]+1;this._={overlap:d,state:0,ignoreCase:!!b,pattern:a}};v.prototype={feedCharacter:function(a){for(this._.ignoreCase&&(a=a.toLowerCase());;){if(a==this._.pattern.charAt(this._.state))return this._.state++,this._.state==this._.pattern.length?(this._.state=0,2):1;if(this._.state)this._.state=this._.overlap[this._.state];else return 0}return null},reset:function(){this._.state=0}};var z=/[.,"'?!;: \u0085\u00a0\u1680\u280e\u2028\u2029\u202f\u205f\u3000]/,

It seems to point to the line that starts with "var z=...". Not sure why it's checking the minified version.

Changes pushed to branch:t/13668.

comment:5 Changed 8 years ago by Piotrek Koszuliński

Resolution: fixed
Status: reviewclosed

Fixed with git:1213ebe.

Turns out that the builder really passes code twice through the GCC. First, initially to minify it, then at the end to verify the whole package.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy