none
WEC2013: IntelliSense doesn't work when warnings are disabled via CDEFINES RRS feed

  • Question

  • Hi,

    in the sources.cmn someone added the following line:

    CDEFINES=$(CDEFINES) -D$(_TGTPLAT) -DBSPIO_PLAT /wd4100 /wd4115 /wd4127 /wd4201 /wd4204 /wd4214 /wd4514

    Now, whenever i open a source file IntelliSense reports an error because the /wd... switches.

    Since CDEFINES is normally only for defines and disabling warnings is not a definition i can understand IntelliSense in complaining.

    But what is the correct way to disable warnings via the sources or sources.cmn files?

    Or is there a way to let IntelliSense ignore these /wd switches?

    When i remove the /wd's then IntelliSense works, but the build does not since at several places WARNISERROR is set to 1.

    Regards

    versat

    Thursday, November 17, 2016 1:44 PM

All replies

  • Hi Versat,

    There are multiple sources.cmn in the Compact tree. can you please provide the path? Also, searching the current sources.cmn files do not contain the line you are describing above. Do you know how or where you received that file? 

    Sincerely,

    IoTGirl

    Thursday, November 17, 2016 6:25 PM
    Moderator
  • IMHO it is a bit naughty to hide warnings like this.

    4100 you should use UNREFERENCED_PARAMETER(param); in your code, to make it clear this is intentionally not used.

    4115 you need to fix this, or in the extreme case #pragma warning push #pragma warning (disable: 4115) #pragma warning pop, wherever you really can't fix this issue

    4127 fix this everywhere. Don't use while (true), use for (;;) instead to get rid of this warning

    4201 just name your structs, or use the #pragma trick from 4115 if you really can't fix this

    4202 remove all old style function declarations. This is usually not intended and could indicate a real problem!

    4214 fix it! The compiler will always use int type for bit field types, so no point in fooling the coder after you

    4514 this warning should be off by default, but if it is on and you don't want it, either remove functions not used (remove clutter) or #ifdef the functions if they are depending on some other conditionally compiled code that calls them

    All in all; very easy to fix. No need to mislead the coder or customer working with your code later!


    Good luck,

    Michel Verhagen, eMVP
    Check out my blog: https://guruce.com/blog

    GuruCE
    Microsoft Embedded Partner
    NXP Proven Partner
    https://guruce.com
    Consultancy, training and development services.

    Interested in WEC on i.MX6?
    Get the only 100% stable and best performing i.MX6 BSP for WEC7 and WEC2013 here: https://guruce.com/imx6

    Friday, November 18, 2016 12:42 AM
    Moderator
  • Hi IoTGirl,

    this line is from $(_TARGETPLATROOT)/sources.cmn, a similar line is in a sources.cmn under 3rdParty.

    We are developing drivers and tools for our customer who adapted the BSP (from Adeneo as far as i know), they must have added this line to sources.cmn.

    It is used this way for years and already with WINCE600.

    Regards,

    versat

    Friday, November 18, 2016 7:28 AM
  • Thank you for the detailed answer, i'm absolutely with you and would never ever disable warnings like this. Quite the contrast, i use highest warning levels and static code analysis to be sure to get as many hints as possible.

    I will ask our customer to remove disabling the warnings this way and fix the issues, but since this BSP and the adaptations are historically grown i'm not sure if they really change it.

    That is the reason for my question if i can at least fix IntelliSense to work when developing drivers/tools/etc.

    I would be happy if i could remove this /wd.. from CDEFINES at least in our sources files for our drivers/tools. But i guess this is not possible.

    Regards

    versat

    Friday, November 18, 2016 7:38 AM
  • Hi versat,

    Please reach out to Adeneo (Witekio) for BSP support.  They should be able to address the settings changes you need.

    Sincerely,

    IoTGirl


    Friday, November 18, 2016 6:15 PM
    Moderator