Opened 9 years ago

Closed 9 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)

https://github.com/ckeditor/ckeditor-dev/blob/dbaaf0b5abd2ac1c8c7e401ac28fd1080c83517c/plugins/find/dialogs/find.js#L380 https://github.com/ckeditor/ckeditor-dev/blob/dbaaf0b5abd2ac1c8c7e401ac28fd1080c83517c/plugins/magicline/plugin.js#L498

Change History (5)

comment:1 Changed 9 years ago by Wiktor Walc

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

comment:2 Changed 9 years ago by Wiktor Walc

Description: modified (diff)

comment:3 Changed 9 years ago by Tade0

Owner: set to Tade0
Status: confirmedassigned

comment:4 Changed 9 years ago by Tade0

Status: assignedreview

Found one more instance in:

https://github.com/ckeditor/ckeditor-dev/blob/dbaaf0b5abd2ac1c8c7e401ac28fd1080c83517c/dev/tasks/plugin.js#L251

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 9 years ago by Piotrek Koszuliński

Resolution: fixed
Status: reviewclosed
Version: 4.5.24.5.3

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