It is currently 23 Sep 2018, 14:37
   
Text Size

Bugs via static code analysis

Moderators: FranAvalon, Marek14, CCGHQ Admins

Bugs via static code analysis

Postby Snacko » 18 Nov 2012, 11:58

I ran static analysis on the code and here's some serious bugs:
| Open
[Magic\M13\CardM13.cpp:3362]: (error) Uninitialized variable: n
[Magic\MagicCore\Card.cpp:1779] -> [Magic\MagicCore\Card.cpp:1780]: (warning) Variable 'movetype' is reassigned a value before the old one has been used. 'break;' missing?
[Magic\MagicCore\Card.cpp:1780] -> [Magic\MagicCore\Card.cpp:1781]: (warning) Variable 'movetype' is reassigned a value before the old one has been used. 'break;' missing?
[Magic\MagicCore\Card.cpp:1781] -> [Magic\MagicCore\Card.cpp:1782]: (warning) Variable 'movetype' is reassigned a value before the old one has been used. 'break;' missing?
[Magic\MagicCore\Card.cpp:1782] -> [Magic\MagicCore\Card.cpp:1783]: (warning) Variable 'movetype' is reassigned a value before the old one has been used. 'break;' missing?
[Magic\MagicCore\Card.cpp:1783] -> [Magic\MagicCore\Card.cpp:1784]: (warning) Variable 'movetype' is reassigned a value before the old one has been used. 'break;' missing?
[Magic\MagicCore\Card.cpp:1784] -> [Magic\MagicCore\Card.cpp:1785]: (warning) Variable 'movetype' is reassigned a value before the old one has been used. 'break;' missing?
[Magic\MagicCore\Cost.cpp:147]: (error) Invalid pointer 'costConfig' after push_back().
[Magic\MagicCore\Cost.cpp:349]: (error) Invalid pointer 'costConfig' after push_back().
[Magic\MagicCore\Modifiers.cpp:2888] -> [Magic\MagicCore\Modifiers.cpp:2889]: (error) Possible null pointer dereference: pCounter2 - otherwise it is redundant to check it against null.
[Magic\MagicCore\NetManager.cpp:50]: (warning) Member variable 'CUserInfoMessage::m_dwForeignVersionMS' is not initialized in the constructor.
[Magic\MagicCore\NetManager.cpp:82]: (warning) Member variable 'CGameRequestMessage::m_nStartPreference' is not initialized in the constructor.
[Magic\MagicCore\NetManager.cpp:156]: (warning) Member variable 'CGameSelectActionMessage::m_nSelectedMove' is not initialized in the constructor.
[Magic\MagicCore\NetManager.cpp:289]: (warning) Member variable 'CFileFragmentMessage::m_Buffer' is not initialized in the constructor.
[Magic\MagicWand\AppearanceDialog.cpp:16]: (warning) Member variable 'CAppearanceDialog::m_nCardSize' is not initialized in the constructor.
[Magic\MagicWand\resize.inl:131]: (error) Using 'sizeof' on array given as function argument returns size of a pointer.
[Magic\MagicWand\ChatDialogBar.cpp:75]: (warning) Member variable 'CChatDialogBar::m_MessageEdit' is not initialized in the constructor.
[Magic\MagicWand\DeckDialog.cpp:21]: (warning) Member variable 'CDeckDialog::m_acBlocks' is not initialized in the constructor.
[Magic\MagicWand\EStringAutoComplete.cpp:92]: (warning) Ineffective statement similar to '*A++;'. Did you intend to write '(*A)++;'?
[Magic\MagicWand\GameSettingsDialog.cpp:15]: (warning) Member variable 'CGameSettingsDialog::m_dwMaxDuration' is not initialized in the constructor.
[Magic\MagicWand\RoundButton.cpp:258]: (warning) Member variable 'CRoundButton::m_nRadius' is not initialized in the constructor.
[Magic\MagicWand\StartDialog.cpp:23]: (warning) Member variable 'CStartDialog::m_bWithComputer' is not initialized in the constructor.
[Magic\MagicWand\sizecbar.cpp:69]: (warning) Member variable 'CSizingControlBar::m_htEdge' is not initialized in the constructor.
[Magic\Mirage\CardMirage.cpp:1410]: (warning) Redundant assignment of 'pHand' to itself.
[Magic\Mirage\CardMirage.cpp:5435]: (warning) String literal compared with variable 'name'. Did you intend to use strcmp() instead?

1st one I would move the code so that life modification only occurs if there's a creature, but maybe you want to leave it like that and just set n=0 by default
2nd case fall-trough, seems like not intended
3rd cost_config looks ok, so a false positive
4rd first derefference then check for nullness, you need to swap those
5th sizeof is compile time only, so it won't work for arrays passed at runtime, you need to pass the size of it via a variable

some extra:
| Open
[Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:2991] -> [Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:3004]: (performance) Variable 'nCount' is reassigned a value before the old one has been used.
[Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:3042] -> [Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:3055]: (performance) Variable 'nCount' is reassigned a value before the old one has been used.
[Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:3094] -> [Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:3107]: (performance) Variable 'nCount' is reassigned a value before the old one has been used.
[Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:3154] -> [Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:3167]: (performance) Variable 'nCount' is reassigned a value before the old one has been used.
[Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:3206] -> [Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:3219]: (performance) Variable 'nCount' is reassigned a value before the old one has been used.
[Magic\Darksteel\CardDarksteel.cpp:2089] -> [Magic\Darksteel\CardDarksteel.cpp:2091]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Darksteel\CardDarksteel.cpp:2101] -> [Magic\Darksteel\CardDarksteel.cpp:2103]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Darksteel\CardDarksteel.cpp:2115] -> [Magic\Darksteel\CardDarksteel.cpp:2117]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Eventide\CardEventide.cpp:6651] -> [Magic\Eventide\CardEventide.cpp:6656]: (performance) Variable 'nCount' is reassigned a value before the old one has been used.
[Magic\Five\CardFive.cpp:3108] -> [Magic\Five\CardFive.cpp:3109]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Five\CardFive.cpp:3121] -> [Magic\Five\CardFive.cpp:3122]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Five\CardFive.cpp:3133] -> [Magic\Five\CardFive.cpp:3135]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Five\CardFive.cpp:3148] -> [Magic\Five\CardFive.cpp:3150]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Five\CardFive.cpp:3163] -> [Magic\Five\CardFive.cpp:3165]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Five\CardFive.cpp:3178] -> [Magic\Five\CardFive.cpp:3180]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Five\CardFive.cpp:3193] -> [Magic\Five\CardFive.cpp:3195]: (performance) Variable 'cont_l_m' is reassigned a value before the old one has been used.
[Magic\Five\CardFive.cpp:3194] -> [Magic\Five\CardFive.cpp:3196]: (performance) Variable 'opp_l_m' is reassigned a value before the old one has been used.
[Magic\IceAge\CardIceAge.cpp:3250] -> [Magic\IceAge\CardIceAge.cpp:3252]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\IceAge\CardIceAge.cpp:3262] -> [Magic\IceAge\CardIceAge.cpp:3264]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\IceAge\CardIceAge.cpp:3274] -> [Magic\IceAge\CardIceAge.cpp:3276]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\IceAge\CardIceAge.cpp:3286] -> [Magic\IceAge\CardIceAge.cpp:3288]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\IceAge\CardIceAge.cpp:3298] -> [Magic\IceAge\CardIceAge.cpp:3300]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Lorwyn\CardLorwyn.cpp:8017] -> [Magic\Lorwyn\CardLorwyn.cpp:8018]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Lorwyn\CardLorwyn.cpp:8039] -> [Magic\Lorwyn\CardLorwyn.cpp:8040]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Lorwyn\CardLorwyn.cpp:8062] -> [Magic\Lorwyn\CardLorwyn.cpp:8063]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\MagicCore\AbilityEnchant.cpp:830]: (performance) Possible inefficient checking for 'cards' emptiness.
[Magic\MagicCore\AbilityEnchant.cpp:2204]: (performance) Possible inefficient checking for 'entries' emptiness.
[Magic\MagicCore\AbilityEnchant.cpp:2872]: (performance) Possible inefficient checking for 'creatures' emptiness.
[Magic\MagicCore\AbilityNonStack2.cpp:333]: (performance) Possible inefficient checking for 'cardFilters' emptiness.
[Magic\MagicCore\AbilityStack1.cpp:239]: (performance) Possible inefficient checking for 'cardFilters' emptiness.
[Magic\MagicCore\AbilityStack2.cpp:1280]: (performance) Possible inefficient checking for 'entries' emptiness.
[Magic\MagicCore\AbilityStack2.cpp:3884]: (performance) Possible inefficient checking for 'entries' emptiness.
[Magic\MagicCore\AbilityStack2.cpp:4164]: (performance) Possible inefficient checking for 'entries' emptiness.
[Magic\MagicCore\AbilityStack2.cpp:5864]: (performance) Possible inefficient checking for 'entries' emptiness.
[Magic\MagicCore\AbilityTarget.cpp:10896] -> [Magic\MagicCore\AbilityTarget.cpp:10900]: (performance) Variable 'pDiscardFilter' is reassigned a value before the old one has been used.
[Magic\MagicCore\AbilityTarget.cpp:4605]: (performance) Possible inefficient checking for 'entries' emptiness.
[Magic\MagicCore\AbilityTarget.cpp:6982]: (performance) Possible inefficient checking for 'entries' emptiness.
[Magic\MagicCore\AbilityTarget.cpp:7069]: (performance) Possible inefficient checking for 'entries' emptiness.
[Magic\MagicCore\AbilityTarget.cpp:11815]: (performance) Possible inefficient checking for 'entries' emptiness.
[Magic\MagicCore\AbilityTriggered1.cpp:1401]: (performance) Possible inefficient checking for 'entries' emptiness.
[Magic\MagicCore\CardStore.cpp:902]: (performance) Possible inefficient checking for 'details' emptiness.
[Magic\MagicCore\CardStore.cpp:948]: (performance) Possible inefficient checking for 'pool' emptiness.
[Magic\MagicCore\CardStore.cpp:1008]: (performance) Possible inefficient checking for 'pool' emptiness.
[Magic\MagicCore\Deck.cpp:440]: (performance) Possible inefficient checking for 'vCandidates' emptiness.
[Magic\MagicCore\Deck.cpp:1263]: (performance) Prefer prefix ++/-- operators for non-primitive types.
[Magic\MagicCore\GUIUtility.cpp:1044]: (performance) Possible inefficient checking for 'Q' emptiness.
[Magic\MagicCore\GUIUtility.cpp:1438]: (performance) Possible inefficient checking for 'Waypoints' emptiness.
[Magic\MagicCore\Game.cpp:4164]: (performance) Possible inefficient checking for 'manaActions' emptiness.
[Magic\MagicCore\Game.cpp:4241]: (performance) Possible inefficient checking for 'hintCost' emptiness.
[Magic\MagicCore\Game.cpp:4298]: (performance) Possible inefficient checking for 'stackDenialCosts' emptiness.
[Magic\MagicCore\Game.cpp:4300]: (performance) Possible inefficient checking for 'hintCosts' emptiness.
[Magic\MagicCore\Modifiers.cpp:1007]: (performance) Possible inefficient checking for 'gains' emptiness.
[Magic\MagicCore\Modifiers.cpp:1029]: (performance) Possible inefficient checking for 'gains' emptiness.
[Magic\MagicCore\Modifiers.cpp:1045]: (performance) Possible inefficient checking for 'removes' emptiness.
[Magic\MagicCore\Modifiers.cpp:1047]: (performance) Possible inefficient checking for 'gains' emptiness.
[Magic\MagicCore\Player.cpp:237]: (performance) Possible inefficient checking for 'cardFilters' emptiness.
[Magic\MagicCore\Player.cpp:304]: (performance) Possible inefficient checking for 'cardFilters' emptiness.
[Magic\MagicCore\Player.cpp:429]: (performance) Possible inefficient checking for 'cardFilters' emptiness.
[Magic\MagicCore\Target.cpp:79]: (performance) Possible inefficient checking for 'cardFilters' emptiness.
[Magic\MagicWand\ElementManager.cpp:362]: (performance) Possible inefficient checking for 'm_MovingElements' emptiness.
[Magic\MagicWand\ElementManager.cpp:464]: (performance) Possible inefficient checking for 'm_Elements' emptiness.
[Magic\MagicWand\MagicElementManager.cpp:548]: (performance) Possible inefficient checking for 'm_TapUntapCards' emptiness.
[Magic\MagicWand\MagicElementManager.cpp:628]: (performance) Possible inefficient checking for 'm_FlippedCards' emptiness.
[Magic\MagicWand\MagicElementManager.cpp:723]: (performance) Possible inefficient checking for 'm_BlockedLinks' emptiness.
[Magic\MagicWand\MagicWandView.cpp:210]: (performance) Possible inefficient checking for 'blockedElements' emptiness.
[Magic\MagicWand\MagicWandView.cpp:216]: (performance) Possible inefficient checking for 'blockingElements' emptiness.
[Magic\MagicWand\MagicWandView.cpp:231]: (performance) Possible inefficient checking for 'blockingElements' emptiness.
[Magic\MagicWand\MagicWandView.cpp:2327]: (performance) Possible inefficient checking for 'selectedElements' emptiness.
[Magic\MagicWand\MagicWandView.cpp:2437]: (performance) Possible inefficient checking for 'selectedElements' emptiness.
[Magic\MagicWand\SelectionDialogBar.cpp:22] -> [Magic\MagicWand\SelectionDialogBar.cpp:26]: (performance) Variable 'm_hMoveSelected' is reassigned a value before the old one has been used.
[Magic\MagicWand\UILink.cpp:108]: (performance) Possible inefficient checking for 'waypoints' emptiness.
[Magic\MagicWand\UISelection.cpp:107]: (performance) Possible inefficient checking for 'colors' emptiness.
[Magic\MercadianMasques\CardMercadianMasques.cpp:6162] -> [Magic\MercadianMasques\CardMercadianMasques.cpp:6164]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\Morningtide\CardMorningtide.cpp:5033] -> [Magic\Morningtide\CardMorningtide.cpp:5037]: (performance) Variable 'pDiscardFilter' is reassigned a value before the old one has been used.
[Magic\Morningtide\CardMorningtide.cpp:5133] -> [Magic\Morningtide\CardMorningtide.cpp:5137]: (performance) Variable 'pDiscardFilter' is reassigned a value before the old one has been used.
[Magic\Morningtide\CardMorningtide.cpp:5235] -> [Magic\Morningtide\CardMorningtide.cpp:5239]: (performance) Variable 'pDiscardFilter' is reassigned a value before the old one has been used.
[Magic\Morningtide\CardMorningtide.cpp:5339] -> [Magic\Morningtide\CardMorningtide.cpp:5343]: (performance) Variable 'pDiscardFilter' is reassigned a value before the old one has been used.
[Magic\Morningtide\CardMorningtide.cpp:5446] -> [Magic\Morningtide\CardMorningtide.cpp:5450]: (performance) Variable 'pDiscardFilter' is reassigned a value before the old one has been used.
[Magic\Planeshift\CardPlaneshift.cpp:2321] -> [Magic\Planeshift\CardPlaneshift.cpp:2326]: (performance) Variable 'nCount' is reassigned a value before the old one has been used.
[Magic\TimeSpiral\CardTimeSpiral.cpp:6866] -> [Magic\TimeSpiral\CardTimeSpiral.cpp:6868]: (performance) Variable 'n' is reassigned a value before the old one has been used.
[Magic\TimeSpiral\CardTimeSpiral.cpp:6880] -> [Magic\TimeSpiral\CardTimeSpiral.cpp:6882]: (performance) Variable 'n' is reassigned a value before the old one has been used.

Need to change all !x.size() to x.empty() . It's a huge performance improvement when the collection is lengthy. Most of the reassigned a value I wouldn't bother changing, however you should look at some and decide.

| Open
[EpochLib\Connection.cpp:240]: (style) The scope of the variable 'pInstance' can be reduced.
[EpochLib\Logging.cpp:9]: (style) Copying 'auto_ptr' pointer to another does not create two equal objects since one has lost its ownership of the pointer.
[EpochLib\Logging.cpp:24]: (style) Copying 'auto_ptr' pointer to another does not create two equal objects since one has lost its ownership of the pointer.
[EpochLib\ModulVer.cpp:48]: (style) Checking if unsigned variable 'len' is less than zero.
[EpochLib\ModulVer.cpp:54]: (style) Checking if unsigned variable 'len' is less than zero.
[EpochLib\Threading.cpp:187]: (style) Variable 'apComInit' is assigned a value that is never used.
[Magic\AlaraReborn\CardAlaraReborn.cpp:4710]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\AlaraReborn\CardAlaraReborn.cpp:4711]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\AlaraReborn\CardAlaraReborn.cpp:2914]: (style) Variable 'target' is assigned a value that is never used.
[Magic\AlaraReborn\CardAlaraReborn.cpp:4570]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\Alliances\CardAlliances.cpp:2878]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\Alliances\CardAlliances.cpp:3338]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Apocalypse\CardApocalypse.cpp:4450]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Apocalypse\CardApocalypse.cpp:4451]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Apocalypse\CardApocalypse.cpp:4521]: (style) Variable 'pTarget' is assigned a value that is never used.
[Magic\AvacynRestored\CardAvacynRestored.cpp:346]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\AvacynRestored\CardAvacynRestored.cpp:408]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\AvacynRestored\CardAvacynRestored.cpp:986]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\AvacynRestored\CardAvacynRestored.cpp:3577]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:2919]: (style) Variable 'pOppInplay' is assigned a value that is never used.
[Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:2920]: (style) Variable 'pInplay' is assigned a value that is never used.
[Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:3919]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.cpp:5988]: (style) Variable 'pActionContainer1' is assigned a value that is never used.
[Magic\ChampionsOfKamigawa\CardChampionsOfKamigawa.h:1555]: (style) The class 'CHeartbeatOfSpringCard' does not have a constructor.
[Magic\Coldsnap\CardColdsnap.cpp:3338]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Coldsnap\CardColdsnap.cpp:3339]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Coldsnap\CardColdsnap.cpp:3045]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\Coldsnap\CardColdsnap.cpp:4113]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Commander\CardCommander.cpp:658]: (style) C-style pointer casting
[Magic\Commander\CardCommander.cpp:671]: (style) C-style pointer casting
[Magic\Commander\CardCommander.cpp:684]: (style) C-style pointer casting
[Magic\Commander\CardCommander.cpp:697]: (style) C-style pointer casting
[Magic\Commander\CardCommander.cpp:710]: (style) C-style pointer casting
[Magic\Commander\CardCommander.cpp:158]: (style) Variable 'time' is assigned a value that is never used.
[Magic\Commander\CardCommander.cpp:1410]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\Dark\CardDark.cpp:1123]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Dark\CardDark.cpp:1254]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Darksteel\CardDarksteel.cpp:4789]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Darksteel\CardDarksteel.cpp:4790]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Darksteel\CardDarksteel.cpp:4925]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Darksteel\CardDarksteel.cpp:4926]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Darksteel\CardDarksteel.h:516]: (style) The class 'CDeathCloudCard' does not have a constructor.
[Magic\Dissension\CardDissension.cpp:2027]: (style) Variable 'nCost' is assigned a value that is never used.
[Magic\Dissension\CardDissension.cpp:2065]: (style) Variable 'nCost' is assigned a value that is never used.
[Magic\Dissension\CardDissension.cpp:4666]: (style) Variable 'nPermanents' is assigned a value that is never used.
[Magic\Dissension\CardDissension.cpp:5161]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\DominiasVault\CardDominiasVault.cpp:392]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\DominiasVault\CardDominiasVault.cpp:393]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Eight\CardEight.cpp:3060]: (style) Variable 'nCards' is assigned a value that is never used.
[Magic\Eight\CardEight.cpp:3062]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\Eventide\CardEventide.cpp:6065]: (style) The scope of the variable 'max' can be reduced.
[Magic\Eventide\CardEventide.cpp:6066]: (style) The scope of the variable 'converted' can be reduced.
[Magic\Eventide\CardEventide.cpp:6067]: (style) The scope of the variable 'temp' can be reduced.
[Magic\Eventide\CardEventide.cpp:6106]: (style) The scope of the variable 'max' can be reduced.
[Magic\Eventide\CardEventide.cpp:6107]: (style) The scope of the variable 'converted' can be reduced.
[Magic\Eventide\CardEventide.cpp:6108]: (style) The scope of the variable 'temp' can be reduced.
[Magic\Eventide\CardEventide.cpp:5802]: (style) Variable 'converted' is assigned a value that is never used.
[Magic\Eventide\CardEventide.cpp:5803]: (style) Variable 'temp' is assigned a value that is never used.
[Magic\Eventide\CardEventide.cpp:5852]: (style) Variable 'converted' is assigned a value that is never used.
[Magic\Eventide\CardEventide.cpp:5853]: (style) Variable 'temp' is assigned a value that is never used.
[Magic\Eventide\CardEventide.cpp:7069]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\Eventide\CardEventide.cpp:7993]: (style) Variable 'nCost' is assigned a value that is never used.
[Magic\Five\CardFive.cpp:4299]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Five\CardFive.cpp:4300]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Five\CardFive.cpp:4573]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Five\CardFive.cpp:4574]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Five\CardFive.cpp:4414]: (style) Variable 'pTarget' is assigned a value that is never used.
[Magic\Five\CardFive.cpp:4508]: (style) Variable 'pTarget' is assigned a value that is never used.
[Magic\Five\CardFive.h:997]: (style) The class 'CPoxCard' does not have a constructor.
[Magic\Four\CardFour.cpp:1274]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Four\CardFour.cpp:1275]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Four\CardFour.cpp:1384]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Four\CardFour.cpp:1385]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Four\CardFour.cpp:1339]: (style) Variable 'pTarget' is assigned a value that is never used.
[Magic\Four\CardFour.cpp:1448]: (style) Variable 'pTarget' is assigned a value that is never used.
[Magic\FutureSight\CardFutureSight.cpp:2588]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\Guildpact\CardGuildpact.cpp:3702]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Guildpact\CardGuildpact.cpp:3703]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Guildpact\CardGuildpact.cpp:2605]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\Guildpact\CardGuildpact.cpp:3986]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Homelands\CardHomelands.cpp:1904]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Homelands\CardHomelands.cpp:1905]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Homelands\CardHomelands.cpp:1987]: (style) Variable 'pTarget' is assigned a value that is never used.
[Magic\IceAge\CardIceAge.cpp:5972]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\IceAge\CardIceAge.cpp:5973]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Innistrad\CardInnistrad.cpp:6691]: (style) The scope of the variable 'pCreature' can be reduced.
[Magic\Innistrad\CardInnistrad.cpp:8172]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Innistrad\CardInnistrad.cpp:8173]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Invasion\CardInvasion.cpp:7548]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Invasion\CardInvasion.cpp:7549]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Invasion\CardInvasion.cpp:7932]: (style) The scope of the variable 'pFound' can be reduced.
[Magic\Invasion\CardInvasion.cpp:5024]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\Invasion\CardInvasion.cpp:6498]: (style) Variable 'size' is assigned a value that is never used.
[Magic\Invasion\CardInvasion.cpp:7139]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\Invasion\CardInvasion.cpp:7153]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\Invasion\CardInvasion.cpp:7167]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\Invasion\CardInvasion.cpp:7181]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\Invasion\CardInvasion.cpp:7195]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\Invasion\CardInvasion.cpp:8201]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Invasion\CardInvasion.h:1725]: (style) The class 'COverabundanceCard' does not have a constructor.
[Magic\Judgment\CardJudgment.cpp:1954]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\Judgment\CardJudgment.cpp:4185]: (style) Variable 'pTarget' is assigned a value that is never used.
[Magic\Judgment\CardJudgment.h:815]: (style) The class 'CMirarisWakeCard' does not have a constructor.
[Magic\Legends\CardLegends.cpp:3577]: (style) Variable 'nCards' is assigned a value that is never used.
[Magic\Legends\CardLegends.cpp:3579]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\Lorwyn\CardLorwyn.cpp:4100]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Lorwyn\CardLorwyn.h:1963]: (style) The class 'CProfaneCommandCard' does not have a constructor.
[Magic\M10\CardM10.cpp:2917]: (style) Variable 'nCost' is assigned a value that is never used.
[Magic\M10\CardM10.cpp:3088]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\M11\CardM11.cpp:2974]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\M11\CardM11.cpp:2975]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\M12\CardM12.cpp:3362]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\M12\CardM12.cpp:3363]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\M12\CardM12.cpp:2328]: (style) Variable 'pTargetAction' is assigned a value that is never used.
[Magic\M12\CardM12.cpp:3110]: (style) Variable 'size' is assigned a value that is never used.
[Magic\M12\CardM12.cpp:3747]: (style) Variable 'pBattlefield' is assigned a value that is never used.
[Magic\M13\CardM13.cpp:3516]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\MagicCore\Ability.cpp:687]: (style) Variable 'found' is assigned a value that is never used.
[Magic\MagicCore\Ability.cpp:889]: (style) Variable 'pUsageAbility' is assigned a value that is never used.
[Magic\MagicCore\AbilityEnchant.cpp:3010]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\MagicCore\AbilityEnchant.cpp:3120]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\MagicCore\AbilityEnchant.cpp:3131]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\MagicCore\AbilityEnchant.cpp:3340]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\MagicCore\AbilityEnchant.cpp:3713]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\MagicCore\AbilityGlobal.cpp:980]: (style) Variable 'pAction1' is assigned a value that is never used.
[Magic\MagicCore\AbilityKeyword.cpp:97]: (style) Consecutive return, break, continue, goto or throw statements are unnecessary.
[Magic\MagicCore\AbilityNonStack1.cpp:232]: (style) Variable 'pAction2' is assigned a value that is never used.
[Magic\MagicCore\AbilityNonStack1.cpp:1960]: (style) Variable 'pCreatureCard' is assigned a value that is never used.
[Magic\MagicCore\AbilityNonStack1.cpp:2246]: (style) Variable 'pNode' is assigned a value that is never used.
[Magic\MagicCore\AbilityNonStack1.cpp:2254]: (style) Variable 'pCaster' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack1.cpp:190]: (style) The scope of the variable 'bFound' can be reduced.
[Magic\MagicCore\AbilityStack1.cpp:194]: (style) Variable 'bFound' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack1.cpp:277]: (style) Variable 'pCaster' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack2.cpp:6397]: (style) The scope of the variable 'n' can be reduced.
[Magic\MagicCore\AbilityStack2.cpp:7238]: (style) The scope of the variable 'n' can be reduced.
[Magic\MagicCore\AbilityStack2.cpp:7505]: (style) The scope of the variable 'n' can be reduced.
[Magic\MagicCore\AbilityStack2.cpp:7778]: (style) The scope of the variable 'n' can be reduced.
[Magic\MagicCore\AbilityStack2.cpp:8013]: (style) The scope of the variable 'n' can be reduced.
[Magic\MagicCore\AbilityStack2.cpp:8427]: (style) The scope of the variable 'n' can be reduced.
[Magic\MagicCore\AbilityStack2.cpp:6412]: (style) Variable 'Controlled' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack2.cpp:6540]: (style) Variable 'nStackSize' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack2.cpp:6840]: (style) Variable 'pAction1' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack2.cpp:7253]: (style) Variable 'Controlled' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack2.cpp:7520]: (style) Variable 'Controlled' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack2.cpp:7722]: (style) Variable 'pAction1' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack2.cpp:7793]: (style) Variable 'Controlled' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack2.cpp:7957]: (style) Variable 'pAction1' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack2.cpp:8028]: (style) Variable 'Controlled' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack2.cpp:8199]: (style) Variable 'pAction1' is assigned a value that is never used.
[Magic\MagicCore\AbilityStack2.cpp:8442]: (style) Variable 'Controlled' is assigned a value that is never used.
[Magic\MagicCore\AbilityTriggered1.cpp:3030]: (style) The scope of the variable 'n' can be reduced.
[Magic\MagicCore\AbilityTriggered1.cpp:3153]: (style) The scope of the variable 'n' can be reduced.
[Magic\MagicCore\AbilityTriggered1.cpp:3180]: (style) The scope of the variable 'to_add' can be reduced.
[Magic\MagicCore\AbilityTriggered1.cpp:1070]: (style) Variable 'pAction1' is assigned a value that is never used.
[Magic\MagicCore\AbilityTriggered1.cpp:1440]: (style) Variable 'pByPlayer' is assigned a value that is never used.
[Magic\MagicCore\AbilityTriggered1.cpp:1860]: (style) Variable 'Tricks' is assigned a value that is never used.
[Magic\MagicCore\AbilityTriggered1.cpp:2023]: (style) Variable 'triggerContext' is assigned a value that is never used.
[Magic\MagicCore\AbilityTriggered1.cpp:2155]: (style) Variable 'Tricks' is assigned a value that is never used.
[Magic\MagicCore\AbilityTriggered1.cpp:2240]: (style) Variable 'Tricks' is assigned a value that is never used.
[Magic\MagicCore\AbilityTriggered1.cpp:2335]: (style) Variable 'Tricks' is assigned a value that is never used.
[Magic\MagicCore\AbilityTriggered1.cpp:2436]: (style) Variable 'Tricks' is assigned a value that is never used.
[Magic\MagicCore\AbilityTriggered1.cpp:3446]: (style) Variable 'Tricks' is assigned a value that is never used.
[Magic\MagicCore\AbilityTriggered3.cpp:1302]: (style) Variable 'pAbility' is assigned a value that is never used.
[Magic\MagicCore\Action.cpp:560]: (style) Variable 'bManaProducing' is assigned a value that is never used.
[Magic\MagicCore\Action1.cpp:287]: (style) Variable 'pCurrentNode' is assigned a value that is never used.
[Magic\MagicCore\Card.cpp:271]: (style) The scope of the variable 'k' can be reduced.
[Magic\MagicCore\Card.cpp:424]: (style) Variable 'pLandAbility' is assigned a value that is never used.
[Magic\MagicCore\Card.cpp:470]: (style) Variable 'pLandAbility' is assigned a value that is never used.
[Magic\MagicCore\Card.cpp:471]: (style) Variable 'pUntapAbility' is assigned a value that is never used.
[Magic\MagicCore\Card.cpp:1378]: (style) Variable 'bResult' is assigned a value that is never used.
[Magic\MagicCore\Card.cpp:1808]: (style) Variable 'bResult' is assigned a value that is never used.
[Magic\MagicCore\Card.cpp:2011]: (style) Variable 'cardFilter' is assigned a value that is never used.
[Magic\MagicCore\Card3.cpp:268]: (style) Variable 'pAbility' is assigned a value that is never used.
[Magic\MagicCore\Card3.cpp:299]: (style) Variable 'pAbility' is assigned a value that is never used.
[Magic\MagicCore\Card3.cpp:336]: (style) Variable 'pAbility' is assigned a value that is never used.
[Magic\MagicCore\Card3.cpp:353]: (style) Variable 'pAbility' is assigned a value that is never used.
[Magic\MagicCore\Card3.cpp:477]: (style) Variable 'pAbility' is assigned a value that is never used.
[Magic\MagicCore\Card3.cpp:506]: (style) Variable 'pAbility' is assigned a value that is never used.
[Magic\MagicCore\Card3.cpp:551]: (style) Variable 'pAbility' is assigned a value that is never used.
[Magic\MagicCore\CardFactory.cpp:84]: (style) The scope of the variable 'bCardsDefined' can be reduced.
[Magic\MagicCore\CardFilter.cpp:746]: (style) Variable 'fit' is assigned a value that is never used.
[Magic\MagicCore\CardStore.cpp:1599]: (style) Copying 'auto_ptr' pointer to another does not create two equal objects since one has lost its ownership of the pointer.
[Magic\MagicCore\GUIUtility.cpp:1333]: (style) Variable 'nOuterLinkCount' is assigned a value that is never used.
[Magic\MagicCore\Game.cpp:2756]: (style) Variable 'nActionCount' is assigned a value that is never used.
[Magic\MagicCore\Game.cpp:3161]: (style) Variable 'nTurnSearched' is assigned a value that is never used.
[Magic\MagicCore\Game.cpp:3665]: (style) Variable 'bAlphaBetaCut' is assigned a value that is never used.
[Magic\MagicCore\Game.cpp:3480]: (style) Variable 'bNonStackAction' is assigned a value that is never used.
[Magic\MagicCore\Game.cpp:4453]: (style) Variable 'cleanup' is assigned a value that is never used.
[Magic\MagicCore\Game.cpp:3170]: (style) Variable 'dwLocalMinimaxNumber' is assigned a value that is never used.
[Magic\MagicCore\Modifiers.cpp:1454]: (style) Statements following return, break, continue, goto or throw will never be executed.
[Magic\MagicCore\NetManager.cpp:910]: (style) Variable 'pMessage' is assigned a value that is never used.
[Magic\MagicCore\NetManager.cpp:929]: (style) Variable 'pMessage' is assigned a value that is never used.
[Magic\MagicCore\Player.cpp:1603]: (style) Variable 'count' is assigned a value that is never used.
[Magic\MagicCore\Player.cpp:1613]: (style) Variable 'count' is assigned a value that is never used.
[Magic\MagicCore\Reveals.cpp:329]: (style) Variable 'pSelectionCardFilter' is assigned a value that is never used.
[Magic\MagicCore\Score.cpp:271]: (style) Variable 'nCardScore' is assigned a value that is never used.
[Magic\MagicCore\Stack.cpp:45]: (style) The scope of the variable 'bFound' can be reduced.
[Magic\MagicCore\Stack.cpp:49]: (style) Variable 'bFound' is assigned a value that is never used.
[Magic\MagicCore\Stack.cpp:692]: (style) Variable 'bFound' is assigned a value that is never used.
[Magic\MagicCore\Subject.cpp:501]: (style) Variable 'pThisCard' is assigned a value that is never used.
[Magic\MagicCore\ThreadCentral.cpp:195]: (style) Variable 'dwResult' is assigned a value that is never used.
[Magic\MagicCore\UsagePattern.cpp:208]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\MagicCore\UsagePattern.cpp:636]: (style) Variable 'stack' is assigned a value that is never used.
[Magic\MagicCore\UsagePattern.cpp:1320]: (style) Variable 'stack' is assigned a value that is never used.
[Magic\MagicCore\UsagePattern.cpp:1547]: (style) Variable 'stack' is assigned a value that is never used.
[Magic\MagicWand\CardDialog.cpp:180]: (style) Variable 'pNMListView' is assigned a value that is never used.
[Magic\MagicWand\MainFrm.h:28]: (style) C-style pointer casting
[Magic\MagicWand\ChatDialogBar.h:10]: (style) The class 'CChatEdit' does not have a constructor.
[Magic\MagicWand\ListViewCtrlEx.cpp:15]: (style) C-style pointer casting
[Magic\MagicWand\ListViewCtrlEx.cpp:118]: (style) C-style pointer casting
[Magic\MagicWand\ListViewCtrlEx.cpp:163]: (style) C-style pointer casting
[Magic\MagicWand\MListCtrl.cpp:21]: (style) C-style pointer casting
[Magic\MagicWand\MListCtrl.cpp:25]: (style) C-style pointer casting
[Magic\MagicWand\MListCtrl.cpp:26]: (style) C-style pointer casting
[Magic\MagicWand\MListCtrl.cpp:625]: (style) C-style pointer casting
[Magic\MagicWand\MListCtrl.cpp:737]: (style) C-style pointer casting
[Magic\MagicWand\MListCtrl.cpp:742]: (style) C-style pointer casting
[Magic\MagicWand\MListCtrl.cpp:1152]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:87]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:195]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:252]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:253]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:333]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:348]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:363]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:373]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:514]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:768]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:769]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:797]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:798]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:826]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:827]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:888]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:889]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:925]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:926]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:1019]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:1599]: (style) C-style pointer casting
[Magic\MagicWand\MagicElementManager.cpp:379]: (style) The scope of the variable 's_bQuickSwitch' can be reduced.
[Magic\MagicWand\MagicWandDoc.cpp:159] -> [Magic\MagicWand\MagicWandDoc.cpp:156]: (style) Found duplicate branches for 'if' and 'else'.
[Magic\MagicWand\MagicWandView.cpp:672]: (style) C-style pointer casting
[Magic\MagicWand\MagicWandView.cpp:2329]: (style) C-style pointer casting
[Magic\MagicWand\MagicWandView.cpp:2439]: (style) C-style pointer casting
[Magic\MagicWand\MagicWandView.cpp:257]: (style) Unused variable: extraRows
[Magic\MagicWand\MagicWandView.cpp:1749]: (style) Variable 'nRemoteUserID' is assigned a value that is never used.
[Magic\MagicWand\OrderCardDialog.cpp:123]: (style) Variable 'pNMListView' is assigned a value that is never used.
[Magic\MagicWand\PreviewBar.cpp:64] -> [Magic\MagicWand\PreviewBar.cpp:64]: (style) Same expression on both sides of '|'.
[Magic\MagicWand\ProgressStatusBar.cpp:71]: (style) Variable 'pMainWnd' is assigned a value that is never used.
[Magic\MagicWand\RoundButton.cpp:219]: (style) Variable 'lError' is assigned a value that is never used.
[Magic\MagicWand\RoundButton.cpp:98]: (style) Variable 'Three_Pi_on_2' is assigned a value that is never used.
[Magic\MagicWand\RoundButton.cpp:477]: (style) Variable 'nStyle' is assigned a value that is never used.
[Magic\MagicWand\UICard.cpp:355]: (style) C-style pointer casting
[Magic\MagicWand\UIImage.cpp:158]: (style) The scope of the variable 'nBorderWidth' can be reduced.
[Magic\MagicWand\UILink.cpp:52]: (style) C-style pointer casting
[Magic\MagicWand\UsageAbilityDialog.cpp:156]: (style) Variable 'pNMListView' is assigned a value that is never used.
[Magic\MagicWand\UsageEntryDialog.cpp:239]: (style) Variable 'pNMListView' is assigned a value that is never used.
[Magic\MagicWand\UsagePatternDialog.cpp:138]: (style) Variable 'pNMListView' is assigned a value that is never used.
[Magic\MagicWand\sizecbar.cpp:208]: (style) C-style pointer casting
[Magic\MagicWand\sizecbar.cpp:790]: (style) C-style pointer casting
[Magic\MagicWand\sizecbar.cpp:1018]: (style) C-style pointer casting
[Magic\MagicWand\sizecbar.cpp:1024]: (style) C-style pointer casting
[Magic\MagicWand\sizecbar.cpp:271]: (style) Variable 'nOldDockBarID' is assigned a value that is never used.
[Magic\MercadianMasques\CardMercadianMasques.cpp:6210]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\MercadianMasques\CardMercadianMasques.cpp:6211]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\MercadianMasques\CardMercadianMasques.cpp:4605]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\MercadianMasques\CardMercadianMasques.cpp:4620]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\MercadianMasques\CardMercadianMasques.cpp:6240]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\MercadianMasques\CardMercadianMasques.cpp:6267]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\MercadianMasques\CardMercadianMasques.cpp:6302]: (style) Variable 'pTarget' is assigned a value that is never used.
[Magic\MercadianMasques\CardMercadianMasques.cpp:6329]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\MercadianMasques\CardMercadianMasques.cpp:6360]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\MercadianMasques\CardMercadianMasques.cpp:6473]: (style) Variable 'nPermanents' is assigned a value that is never used.
[Magic\MercadianMasques\CardMercadianMasques.cpp:6918]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\MercadianMasques\CardMercadianMasques.h:1785]: (style) The class 'CTectonicBreakCard' does not have a constructor.
[Magic\Mirage\CardMirage.cpp:5009]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Mirage\CardMirage.cpp:5010]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Mirage\CardMirage.cpp:5143]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Mirage\CardMirage.cpp:5144]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Mirage\CardMirage.cpp:4710]: (style) Variable 'pModifier' is assigned a value that is never used.
[Magic\Mirage\CardMirage.cpp:5310]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\Mirage\CardMirage.cpp:6035]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\Mirage\CardMirage.cpp:6170]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Mirage\CardMirage.cpp:6439]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Mirage\CardMirage.cpp:6562]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Mirrodin\CardMirrodin.cpp:5749]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Mirrodin\CardMirrodin.cpp:5750]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Mirrodin\CardMirrodin.cpp:6333]: (style) The scope of the variable 'pFound' can be reduced.
[Magic\Mirrodin\CardMirrodin.cpp:4508]: (style) Variable 'nCost' is assigned a value that is never used.
[Magic\Mirrodin\CardMirrodin.cpp:5701]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\Mirrodin\CardMirrodin.cpp:5834]: (style) Variable 'pTarget' is assigned a value that is never used.
[Magic\Mirrodin\CardMirrodin.cpp:5899]: (style) Variable 'pTarget' is assigned a value that is never used.
[Magic\Mirrodin\CardMirrodin.cpp:6347]: (style) Variable 'pFound' is assigned a value that is never used.
[Magic\Morningtide\CardMorningtide.cpp:5690]: (style) The scope of the variable 'pFound' can be reduced.
[Magic\Morningtide\CardMorningtide.cpp:5704]: (style) Variable 'pFound' is assigned a value that is never used.
[Magic\NewPhyrexia\CardNewPhyrexia.h:872]: (style) The class 'CVorinclexVoiceofHungerCard' does not have a constructor.
[Magic\NewPhyrexia\CardNewPhyrexia.cpp:5197]: (style) C-style pointer casting
[Magic\NewPhyrexia\CardNewPhyrexia.cpp:4254]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\NewPhyrexia\CardNewPhyrexia.cpp:4974]: (style) Variable 'time' is assigned a value that is never used.
[Magic\Odyssey\CardOdyssey.h:1530]: (style) The class 'CDruidsCallCard' does not have a constructor.
[Magic\Onslaught\CardOnslaught.cpp:6311]: (style) The scope of the variable 'pFound' can be reduced.
[Magic\Onslaught\CardOnslaught.cpp:3819]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\PlanarChaos\CardPlanarChaos.cpp:5047]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Planechase\CardPlanechase.cpp:1160]: (style) The scope of the variable 'pFound' can be reduced.
[Magic\Planechase\CardPlanechase.cpp:738]: (style) Variable 'pInplay' is assigned a value that is never used.
[Magic\Planechase2\CardPlanechase2.cpp:1290]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\PortalThreeKingdoms\CardPortalThreeKingdoms.cpp:2787]: (style) Consecutive return, break, continue, goto or throw statements are unnecessary.
[Magic\Ravnica\CardRavnica.cpp:4444]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\Ravnica\CardRavnica.cpp:4505]: (style) Variable 'nCount' is assigned a value that is never used.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:4207]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:4208]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:5521]: (style) The scope of the variable 'pFound' can be reduced.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:7118]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:7119]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:7233]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:7234]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:5535]: (style) Variable 'pFound' is assigned a value that is never used.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:6730]: (style) Variable 'nPermanents' is assigned a value that is never used.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:7834]: (style) Variable 'size' is assigned a value that is never used.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:8110]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\ReturnToRavnica\CardReturnToRavnica.cpp:8378]: (style) Variable 'pBattle' is assigned a value that is never used.
[Magic\Revised\CardRevised.cpp:451]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Revised\CardRevised.cpp:452]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Revised\CardRevised.cpp:936]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Revised\CardRevised.cpp:937]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\RiseOfTheEldrazi\CardRiseOfTheEldrazi.cpp:8192]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\ScarsOfMirrodin\CardScarsOfMirrodin.cpp:1804]: (style) The scope of the variable 'pFound' can be reduced.
[Magic\ScarsOfMirrodin\CardScarsOfMirrodin.cpp:6084]: (style) The scope of the variable 'LifeGain' can be reduced.
[Magic\ScarsOfMirrodin\CardScarsOfMirrodin.cpp:6085]: (style) The scope of the variable 'PrevLife' can be reduced.
[Magic\ScarsOfMirrodin\CardScarsOfMirrodin.cpp:6086]: (style) The scope of the variable 'NewLife' can be reduced.
[Magic\ScarsOfMirrodin\CardScarsOfMirrodin.cpp:398]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\ScarsOfMirrodin\CardScarsOfMirrodin.cpp:2599]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\ScarsOfMirrodin\CardScarsOfMirrodin.cpp:5553]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\ScarsOfMirrodin\CardScarsOfMirrodin.cpp:6291]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\Scourge\CardScourge.cpp:3495]: (style) Variable 'pTargetAction' is assigned a value that is never used.
[Magic\Shadowmoor\CardShadowmoor.cpp:7178]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\Shadowmoor\CardShadowmoor.cpp:8470]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\ShardsOfAlara\CardShardsOfAlara.cpp:5454]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\ShardsOfAlara\CardShardsOfAlara.cpp:5455]: (style) Variable 'pOpponent' is assigned a value that is never used.
[Magic\ShardsOfAlara\CardShardsOfAlara.h:1564]: (style) The class 'CImmortalCoilCard' does not have a constructor.
[Magic\ShardsOfAlara\CardShardsOfAlara.h:2081]: (style) The class 'CKeeperOfProgenitusCard' does not have a constructor.
[Magic\Six\CardSix.cpp:2504]: (style) The scope of the variable 'pFound' can be reduced.
[Magic\Tempest\CardTempest.cpp:5190]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Tempest\CardTempest.cpp:5191]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Tempest\CardTempest.cpp:5321]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Tempest\CardTempest.cpp:5322]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Tempest\CardTempest.cpp:5452]: (style) The scope of the variable 'pFound' can be reduced.
[Magic\Tempest\CardTempest.cpp:5466]: (style) Variable 'pFound' is assigned a value that is never used.
[Magic\Ten\CardTen.cpp:3056]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Ten\CardTen.cpp:3057]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\TimeSpiral\CardTimeSpiral.h:1688]: (style) The class 'CCurseOfTheCabalCard' does not have a constructor.
[Magic\TimeSpiral\CardTimeSpiral.h:1922]: (style) The class 'CRestoreBalanceCard' does not have a constructor.
[Magic\TimeSpiral\CardTimeSpiral.h:2287]: (style) The class 'CMishraArtificerProdigyCard' does not have a constructor.
[Magic\TimeSpiral\CardTimeSpiral.cpp:4496]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\TimeSpiral\CardTimeSpiral.cpp:5407]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\TimeSpiral\CardTimeSpiral.cpp:5601]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\TimeSpiral\CardTimeSpiral.cpp:8141]: (style) Variable 'target' is assigned a value that is never used.
[Magic\TimeSpiral\CardTimeSpiral.cpp:8922]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\TimeSpiral\CardTimeSpiral.cpp:9183]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\TimeSpiral\CardTimeSpiral.cpp:9416]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Torment\CardTorment.cpp:3685]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Torment\CardTorment.cpp:3686]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Torment\CardTorment.cpp:3646]: (style) Variable 'pZone' is assigned a value that is never used.
[Magic\Unlimited\CardUnlimited.cpp:5096]: (style) Variable 'pModifier' is assigned a value that is never used.
[Magic\Unlimited\CardUnlimited.h:1652]: (style) The class 'CBalanceCard' does not have a constructor.
[Magic\Unlimited\CardUnlimited.h:1777]: (style) The class 'CManaFlareCard' does not have a constructor.
[Magic\UrzasDestiny\CardUrzasDestiny.cpp:2593]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\UrzasSaga\CardUrzasSaga.cpp:6000]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\UrzasSaga\CardUrzasSaga.cpp:6001]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Vanguard\CardVanguard.cpp:438]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Vanguard\CardVanguard.cpp:439]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Weatherlight\CardWeatherlight.cpp:3221] -> [Magic\Weatherlight\CardWeatherlight.cpp:3219]: (style) Found duplicate branches for 'if' and 'else'.
[Magic\Weatherlight\CardWeatherlight.cpp:2789]: (style) The scope of the variable 'Thumb' can be reduced.
[Magic\Weatherlight\CardWeatherlight.cpp:2790]: (style) The scope of the variable 'Exponent' can be reduced.
[Magic\Weatherlight\CardWeatherlight.cpp:2965]: (style) Variable 'i' is assigned a value that is never used.
[Magic\Worldwake\CardWorldwake.cpp:3364]: (style) Variable 'm_CardFlagModifier3' is assigned a value that is never used.
[Magic\Worldwake\CardWorldwake.cpp:4255]: (style) Variable 'pController' is assigned a value that is never used.
[Magic\Worldwake\CardWorldwake.h:965]: (style) The class 'CQuestForTheGoblinLordCard' does not have a constructor.
[Magic\Zendikar\CardZendikar.cpp:2607]: (style) The scope of the variable 'LifeGain' can be reduced.
[Magic\Zendikar\CardZendikar.cpp:2609]: (style) The scope of the variable 'NewLife' can be reduced.
[Magic\Zendikar\CardZendikar.cpp:4660]: (style) The scope of the variable 'LifeGain' can be reduced.
[Magic\Zendikar\CardZendikar.cpp:4661]: (style) The scope of the variable 'PrevLife' can be reduced.
[Magic\Zendikar\CardZendikar.cpp:4662]: (style) The scope of the variable 'NewLife' can be reduced.
[Magic\Zendikar\CardZendikar.cpp:3162]: (style) Variable 'pmodifierUp1' is assigned a value that is never used.
[Magic\Zendikar\CardZendikar.cpp:4085]: (style) Variable 'pCard' is assigned a value that is never used.
[Magic\Zendikar\CardZendikar.h:1570]: (style) The class 'CKhalniHeartExpeditionCard' does not have a constructor.
[Magic\Zendikar\CardZendikar.h:1585]: (style) The class 'CIorRuinExpeditionCard' does not have a constructor.
[Magic\Zendikar\CardZendikar.h:1600]: (style) The class 'CSoulStairExpeditionCard' does not have a constructor.
[Magic\Zendikar\CardZendikar.h:1616]: (style) The class 'CSunspringExpeditionCard' does not have a constructor.
[Magic\Zendikar\CardZendikar.h:1631]: (style) The class 'CZektarShrineExpeditionCard' does not have a constructor.
[Magic\Zendikar\CardZendikar.h:1646]: (style) The class 'CQuestfortheGravelordCard' does not have a constructor.
[Magic\Zendikar\CardZendikar.h:1661]: (style) The class 'CQuestforAncientSecretsCard' does not have a constructor.
[Magic\Zendikar\CardZendikar.h:1846]: (style) The class 'CQuestfortheHolyRelicCard' does not have a constructor.
[Magic\Zendikar\CardZendikar.h:1968]: (style) The class 'CPyromancerAscensionCard' does not have a constructor.


From this list I would go over the never used variables and see if it's a bug that someone forgot to use them or just cruft and remove them. AbilityKeyword has a break between two lines of code, either delete the 2nd line or this is a bug and move break. Also some code duplicates needs cleaning as card -> cards, same enum twice in one or statement, double return one after another.
Snacko
DEVELOPER
 
Posts: 826
Joined: 29 May 2008, 19:35
Has thanked: 4 times
Been thanked: 73 times

Re: Bugs via static code analysis

Postby FranAvalon » 18 Nov 2012, 18:22

Thanks for the analysis and for your help :)
However, fix that kind of bugs is away of my skills. 99% of my contribution to the project is coding cards, without touch the MagicCore code, re-using existant card code, or just doing simple new code as I did on Treasure Hunt.
I hope that other BA developers from the project read your post and give you a better answer than me :wink:
FranAvalon
Programmer
 
Posts: 568
Joined: 02 Jul 2008, 06:54
Has thanked: 44 times
Been thanked: 64 times


Return to Engine Bugs

Who is online

Users browsing this forum: No registered users and 2 guests


Who is online

In total there are 2 users online :: 0 registered, 0 hidden and 2 guests (based on users active over the past 10 minutes)
Most users ever online was 279 on 11 Jul 2013, 22:03

Users browsing this forum: No registered users and 2 guests

Login Form