Last Comment Bug 457262 - (deadcode) [meta] Delete dead code
(deadcode)
: [meta] Delete dead code
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Rewriting and Analysis (show other bugs)
: Trunk
: x86 All
: -- normal with 8 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
http://zenit.senecac.on.ca/wiki/index...
Depends on: 1152052 1230379 230675 386937 405407 457102 457104 457119 457125 457302 457303 457313 457323 457949 457959 457965 457969 458421 458491 458969 458983 458984 459306 471087 514986 514987 514988 514989 514990 537223 543255 551390 555851 556446 559489 597293 679352 695648 705427 705428 705429 705430 705432 705433 705434 705435 705436 705437 705438 705439 706113 709511 709512 709513 709516 709518 709519 709522 709523 709524 709525 709526 709528 709533 709562 709709 711790 711826 713553 713554 719407 736619 736746 738705 738957 739124 740945 750859 751035 751280 751416 854231 880196 883504 883537 888366 888579 900978 902607 909028 913953 921880 921882 923250 926580 973476 973950 995780 1017752 1028064 1046139 1086510 1147572 1147967 1152079 1184630
Blocks: analyses 709193 750661
  Show dependency treegraph
 
Reported: 2008-09-26 10:21 PDT by (dormant account)
Modified: 2015-12-03 16:36 PST (History)
38 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
possibly constant expressions (6.29 KB, text/plain)
2008-10-01 07:19 PDT, georgi - hopefully not receiving bugspam
no flags Details
13 possibly unused vars (1.49 KB, text/plain)
2008-10-01 07:36 PDT, georgi - hopefully not receiving bugspam
no flags Details

Description (dormant account) 2008-09-26 10:21:56 PDT
This is a bug to track dead code deletion as facilitated by static analysis.
Comment 1 georgi - hopefully not receiving bugspam 2008-10-01 07:19:28 PDT
Created attachment 341281 [details]
possibly constant expressions
Comment 2 georgi - hopefully not receiving bugspam 2008-10-01 07:21:04 PDT
so i built a build with -Wall -W and there are 51 lines with possibly constant expressions - see attachment.

the most drastic:
1601:../../../dist/include/lcms/lcms.h:1436: warning: comparison of unsigned expression < 0 is always false

LCMS_INLINE void* _cmsMalloc(size_t size)
{
    if (size > ((size_t) 1024*1024*500)) return NULL;  // Never allow over 500Mb
    if (size < 0) return NULL;
Comment 3 georgi - hopefully not receiving bugspam 2008-10-01 07:36:51 PDT
Created attachment 341285 [details]
13 possibly unused vars

13 possibly unused vars
Comment 4 georgi - hopefully not receiving bugspam 2008-10-03 05:18:20 PDT
are the 64 gcc warnings worth a new bug - probably the fix will be just deleting lines?
Comment 5 (dormant account) 2008-10-03 09:00:33 PDT
yeah, please file a new bug and make it block this one.
Comment 6 georgi - hopefully not receiving bugspam 2008-10-04 01:24:07 PDT
gcc warnings are Bug 458491
Comment 7 Alfred Kayser 2010-04-01 01:19:50 PDT
Added to the list:
Bug 537223 - Cleanup of gfxColor.h
Bug 230675 - 'decom' of nsICacheVisitor.idl: saves 10% / 150K
Bug 405407 - Merge nsDiskCacheStreamIO and nsDiskCacheStreamOutput
Bug 386937 - ConvertPixel doesn't work as nsColor and gfx_color are not compatible...
Comment 8 (dormant account) 2011-11-28 15:29:33 PST
Ms2get good stuff, how are you finding these?
Comment 9 :Ms2ger (⌚ UTC+1/+2) 2011-11-28 23:40:07 PST
See the URL field :)
Comment 10 :aceman 2011-12-12 02:49:48 PST
Comment on attachment 341281 [details]
possibly constant expressions

Attachment moved to bug 458491.
Comment 11 :aceman 2011-12-12 02:50:26 PST
Comment on attachment 341285 [details]
13 possibly unused vars

Attachment moved to bug 458491.
Comment 12 :aceman 2011-12-15 07:44:19 PST
What modules does this bug actually cover?
Comment 13 (dormant account) 2011-12-15 15:56:24 PST
(In reply to :aceman from comment #12)
> What modules does this bug actually cover?

C/C++ code that gets compiled in firefox
Comment 14 :aceman 2011-12-16 00:33:45 PST
Thanks, so if only Firefox (and not e.g. Thunderbird code above Gecko and Toolkit core), please write it into the summary.
Comment 15 Nicholas Nethercote [:njn] 2014-06-26 03:02:06 PDT
Is this bug still needed?
Comment 16 Sylvestre Ledru [:sylvestre] 2014-06-26 07:47:42 PDT
Nicolas, I don't think it is the case. For clang static analyzer, bug 712350 should be used

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