Search Results

Search found 1881 results on 76 pages for 'suppress warnings'.

Page 1/76 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Suppress excel add-in confirmation message

    - by dogan
    I am accessing excel with C++ and add-ins are being loaded. Everything we load the add-in programatically, the user has to click ok when the add-in is unloaded and loaded. Some users have complained that this can be as much as 20 times for a "run." How can I programatically suppress the add-in confirmation messages? NOTE: excelApplication SetDisplayAlerts(FALSE) does not suppress the confirmation messages.

    Read the article

  • Clang LLVM doesn't generate warnings in Xcode

    - by John Gallagher
    I want lots of lovely warnings when compiling. I've set my build configuration to be based on a build config file I have. When I switch to GCC 4.0, it generates all the required warnings. As soon as I change to the Clang LLVM compiler, all the warnings disappear. Every other setting is identical. What am I missing?

    Read the article

  • How to suppress Flash migration warnings (1090)

    - by aaaidan
    I get "migration issue" warnings when I use mouse/keyboard input handler names such as onMouseDown, onKeyUp, etc. These names are perfectly legal, but sensibly, we are now warned that their use is no longer automatic in ActionScript 3. I want to suppress these warnings, but without suppressing all other warnings, which I find useful. E.g., when I use code like this: protected override function onMouseDown(e:MouseEvent):void { I get an annoying warning like this: Warning: 1090: Migration issue: The onMouseDown event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'mouseDown', callback_handler). There are flex compiler (mxmlc) flags which can suppress actionscript warnings, or all warnings, but I don't want that. That's to general. Ideally I could suppress a specific error/warning number (Warning #1090). Halp?

    Read the article

  • Suppress warnings in Zend Studio

    - by Olaseni
    In Eclipse writing Java, it's easy to suppress warnings on some scopes, by annotating a method or variable within the IDE. Is it possible to suppress warnings at scopes while writing PHP within Zend Studio 7.0?

    Read the article

  • Shell script to emulate warnings-as-errors?

    - by talkaboutquality
    Some compilers let you set warnings as errors, so that you'll never leave any compiler warnings behind, because if you do, the code won't build. This is a Good Thing. Unfortunately, some compilers don't have a flag for warnings-as-errors. I need to write a shell script or wrapper that provides the feature. Presumably it parses the compilation console output and returns failure if there were any compiler warnings (or errors), and success otherwise. "Failure" also means (I think) that object code should not be produced. What's the shortest, simplest UNIX/Linux shell script you can write that meets the explicit requirements above, as well as the following implicit requirements of otherwise behaving just like the compiler: - accepts all flags, options, arguments - supports redirection of stdout and stderr - produces object code and links as directed Key words: elegant, meets all requirements. Extra credit: easy to incorporate into a GNU make file. Thanks for your help. === Clues === This solution to a different problem, using shell functions (?), Append text to stderr redirects in bash, might figure in. Wonder how to invite litb's friend "who knows bash quite well" to address my question? === Answer status === Thanks to Charlie Martin for the short answer, but that, unfortunately, is what I started out with. A while back I used that, released it for office use, and, within a few hours, had its most severe drawback pointed out to me: it will PASS a compilation with no warnings, but only errors. That's really bad because then we're delivering object code that the compiler is sure won't work. The simple solution also doesn't meet the other requirements listed. Thanks to Adam Rosenfield for the shorthand, and Chris Dodd for introducing pipefail to the solution. Chris' answer looks closest, because I think the pipefail should ensure that if compilation actually fails on error, that we'll get failure as we should. Chris, does pipefail work in all shells? And have any ideas on the rest of the implicit requirements listed above?

    Read the article

  • Count warnings in Python 2.4

    - by l0b0
    I've got some tests that need to count the number of warnings raised by a function. In Python 2.6 this is simple, using with warnings.catch_warnings(record=True) as warn: ... self.assertEquals(len(warn), 2) Unfortunately, with is not available in Python 2.4, so what else could I use? I can't simply check if there's been a single warning (using warning filter with action='error' and try/catch), because the number of warnings is significant.

    Read the article

  • Suppress task switch keys (winkey, alt-tab, alt-esc, ctrl-esc) using low-level keyboard hook

    - by matt
    I'm trying to suppress task switch keys (such as winkey, alt-tab, alt-esc, ctrl-esc, etc.) by using a low-level keyboard hook. I'm using the following LowLevelKeyboardProc callback: IntPtr HookCallback(int nCode, IntPtr wParam, ref KBDLLHOOKSTRUCT lParam) { if (nCode >= 0) { bool suppress = false; // Suppress left and right windows keys. if (lParam.Key == VK_LWIN || lParam.Key == VK_RWIN) suppress = true; // Suppress alt-tab. if (lParam.Key == VK_TAB && HasAltModifier(lParam.Flags)) suppress = true; // Suppress alt-escape. if (lParam.Key == VK_ESCAPE && HasAltModifier(lParam.Flags)) suppress = true; // Suppress ctrl-escape. /* How do I hook CTRL-ESCAPE ? */ // Suppress keys by returning 1. if (suppress) return new IntPtr(1); } return CallNextHookEx(HookID, nCode, wParam, ref lParam); } bool HasAltModifier(int flags) { return (flags & 0x20) == 0x20; } However, I'm at a loss as to how to suppress the CTRL-ESC combination. Any suggestions? Thanks.

    Read the article

  • Testing warnings with doctest

    - by Eli Courtwright
    I'd like to use doctests to test the presence of certain warnings. For example, suppose I have the following module: from warnings import warn class Foo(object): """ Instantiating Foo always gives a warning: >>> foo = Foo() testdocs.py:14: UserWarning: Boo! warn("Boo!", UserWarning) >>> """ def __init__(self): warn("Boo!", UserWarning) If I run python -m doctest testdocs.py to run the doctest in my class and make sure that the warning is printed, I get: testdocs.py:14: UserWarning: Boo! warn("Boo!", UserWarning) ********************************************************************** File "testdocs.py", line 7, in testdocs.Foo Failed example: foo = Foo() Expected: testdocs.py:14: UserWarning: Boo! warn("Boo!", UserWarning) Got nothing ********************************************************************** 1 items had failures: 1 of 1 in testdocs.Foo ***Test Failed*** 1 failures. It looks like the warning is getting printed but not captured or noticed by doctest. I'm guessing that this is because warnings are printed to sys.stderr instead of sys.stdout. But this happens even when I say sys.stderr = sys.stdout at the end of my module. So is there any way to use doctests to test for warnings? I can find no mention of this one way or the other in the documentation or in my Google searching.

    Read the article

  • Suppressing line specific XCode compiler warnings

    - by MrHen
    Similar to Ben Gottlieb's question, I have a handful of deprecated calls that are bugging me. Is there a way to suppress warnings by line? For instance: if([[UIApplication sharedApplication] respondsToSelector:@selector(setStatusBarHidden:withAnimation:)]) { [[UIApplication sharedApplication] setStatusBarHidden:YES withAnimation:UIStatusBarAnimationSlide]; } else { [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO]; //causes deprecation warning } All I care about is that line. I don't want to turn off all deprecation warnings. I would also rather not do something like suppress specific warnings by file. There have been a few other circumstances where I wanted to flag a specific line as okay even though the compiler generates a warning. I essentially want to let my team know that the problem has been handled and stop getting bugged about the same line over and over.

    Read the article

  • Delphi disable warnings fails

    - by Alan Clark
    I have the following code in a Delphi 2007 application: function TBaseCriteriaObject.RecursiveCount( ObjType: TBaseCriteriaObjectClass): integer; var CurObj: TBaseCriteriaObject; begin result := 0; {$WARNINGS OFF} for CurObj in RecursiveChildren(ObjType) do Inc(Result); {$WARNINGS ON} end; Which produces this warning: [DCC Warning] BaseCriteriaObject.pas(255): H2077 Value assigned to 'CurObj' never used I understand the warning but don't want to change the code, so how do I get rid of the warning because {$WARNINGS OFF} does not seem to work in this case?

    Read the article

  • How to suppress warnings in external headers in Visual C++

    - by Bob Whiteman
    I'm starting a new BREW project, and I'd like to compile with Warning Level 4 (/W4) to keep the application code nice and clean. The problem is that the BREW headers themselves don't compile cleanly with /W4. In gcc you can differentiate between application and system headers by using -I and -isystem, and then by default gcc doesn't report any compilation warnings in system headers. Is there an equivalent mechanism in Visual C++?

    Read the article

  • Is it a good practice to suppress warnings?

    - by Chris Cooper
    Sometimes while writing Java in Eclipse, I write code that generates warnings. A common one is this, which I get when extending the Exception class: public class NumberDivideException extends Exception { public NumberDivideException() { super("Illegal complex number operation!"); } public NumberDivideException(String s) { super(s); } } // end NumberDivideException The warning: The serializable class NumberDivideException does not declare a static final serialVersionUID field of type long. I know this warning is caused by my failure to... well, it says right above. I could solve it by including the serialVersionUID, but this is a one hour tiny assignment for school; I don't plan on serializing it anytime soon... The other option, of course, is to let Eclipse add @SuppressWarnings("serial"). But every time my mouse hovers over the Suppress option, I feel a little guilty. For programming in general, is it a good habit to suppress warnings? (Also, as a side question, is adding a "generated" serialVersionUID like serialVersionUID = -1049317663306637382L; the proper way to add a serialVersionUID, or do I have to determine the number some other way?)

    Read the article

  • Xcode Objective-c warnings "creating selector for nonexistent method" with OCUnit (SenTestingKit)

    - by niblha
    I started getting getting warnings like the following in XCode when trying to write some unit tests with OCUnit (SenTestingKit). warning: creating selector for nonexistent method 'myMethodName1:' warning: creating selector for nonexistent method 'myMethodName2:' ... warning: creating selector for nonexistent method 'release' warning: creating selector for nonexistent method 'retain' warning: creating selector for nonexistent method 'alloc' warning: creating selector for nonexistent method 'init' Is it something I should worry about, or can I somehow disable these types of warnings by some compiler flag?

    Read the article

  • Linker warnings when using stdscr (ncurses)

    - by flarn2006
    Okay, so I'm getting these warnings whenever I try to use stdscr in pdcurses: LINK : warning LNK4098: defaultlib "LIBC" conflicts with use of other libs; use /NODEFAULTLIB:library LINK : warning LNK4049: locally defined symbol "_stdscr" imported LINK : warning LNK4049: locally defined symbol "_SP" imported How do I fix this? They're just warnings, but when I run my program, it crashes, so they probably have something to do with it. Especially considering the fact that the line it crashes at is the one that uses stdscr...

    Read the article

  • Overriding Object.Equals() instance method in C#; now Code Analysis / FxCop warning CA2218: "should

    - by Chris W. Rea
    I've got a complex class in my C# project on which I want to be able to do equality tests. It is not a trivial class; it contains a variety of scalar properties as well as references to other objects and collections (e.g. IDictionary). For what it's worth, my class is sealed. To enable a performance optimization elsewhere in my system (an optimization that avoids a costly network round-trip), I need to be able to compare instances of these objects to each other for equality – other than the built-in reference equality – and so I'm overriding the Object.Equals() instance method. However, now that I've done that, Visual Studio 2008's Code Analysis a.k.a. FxCop, which I keep enabled by default, is raising the following warning: warning : CA2218 : Microsoft.Usage : Since 'MySuperDuperClass' redefines Equals, it should also redefine GetHashCode. I think I understand the rationale for this warning: If I am going to be using such objects as the key in a collection, the hash code is important. i.e. see this question. However, I am not going to be using these objects as the key in a collection. Ever. Feeling justified to suppress the warning, I looked up code CA2218 in the MSDN documentation to get the full name of the warning so I could apply a SuppressMessage attribute to my class as follows: [SuppressMessage("Microsoft.Naming", "CA2218:OverrideGetHashCodeOnOverridingEquals", Justification="This class is not to be used as key in a hashtable.")] However, while reading further, I noticed the following: How to Fix Violations To fix a violation of this rule, provide an implementation of GetHashCode. For a pair of objects of the same type, you must ensure that the implementation returns the same value if your implementation of Equals returns true for the pair. When to Suppress Warnings ----- Do not suppress a warning from this rule. [arrow & emphasis mine] So, I'd like to know: Why shouldn't I suppress this warning as I was planning to? Doesn't my case warrant suppression? I don't want to code up an implementation of GetHashCode() for this object that will never get called, since my object will never be the key in a collection. If I wanted to be pedantic, instead of suppressing, would it be more reasonable for me to override GetHashCode() with an implementation that throws a NotImplementedException? Update: I just looked this subject up again in Bill Wagner's good book Effective C#, and he states in "Item 10: Understand the Pitfalls of GetHashCode()": If you're defining a type that won't ever be used as the key in a container, this won't matter. Types that represent window controls, web page controls, or database connections are unlikely to be used as keys in a collection. In those cases, do nothing. All reference types will have a hash code that is correct, even if it is very inefficient. [...] In most types that you create, the best approach is to avoid the existence of GetHashCode() entirely. ... that's where I originally got this idea that I need not be concerned about GetHashCode() always.

    Read the article

  • mingw spitting countless warnings about ignoring "dll import" attribute

    - by hasen j
    I'm using mingw32-make to compile a qt project that uses opengl, it compiles correctly and everything, but it spits countless warning messages of the form: c:/qt3/include/qcolor.h:67: warning: inline function `int qGray(int, int, int)' declared as dllimport: attribute ignored For this particular instance, the function declaration is: Q_EXPORT inline int qGray( int r, int g, int b )// convert R,G,B to gray 0..255 { return (r*11+g*16+b*5)/32; } My question is, why is it spitting all these warning? how can I silence them without silencing other legitimate warnings (i.e. warnings that are related directly to my code and could be potential problems)? More importantly, why is mingw ignoring the dll import attribute in the first place?

    Read the article

  • Visualize compiler warnings

    - by christoffer
    I'm looking for a way to visualize compiler warnings and remarks, by annotating or otherwise showing which lines cause a report. This is much like a modern IDE like NetBeans or Eclipse already does, but I'd like to take output from several compilers (and other static code analysis tools) at once, and create one single annotation in order to get a better overview. The rationale is that we've seen some problems go completely undetected by, say, Visual Studio 2005, but accurately detected with a proprietary ARM compiler, and vice versa. Cross-referencing warnings could potentially locate problems better, but doing so completely manually is infeasible. Have you heard of such a tool? Could an open-source IDE like Eclipse be extended to use several compilers at once, or has it already been done?

    Read the article

  • How do I get rid of these warnings?

    - by Brian Postow
    This is really several questions, but anyway... I'm working with a big project in XCode, relatively recently ported from MetroWorks (Yes, really) and there's a bunch of warnings that I want to get rid of. Every so often an IMPORTANT warning comes up, but I never look at them because there's too many garbage ones. So, if I can either figure out how to get XCode to stop giving the warning, or actually fix the problem, that would be great. Here are the warnings: It claims that <map.h> is antiquated. However, when I replace it with <map> my files don't compile. Evidently, there's something in map.h that isn't in map... this decimal constant is unsigned only in ISO C90 This is a large number being compared to an unsigned long. I have even cast it, with no effect. enumeral mismatch in conditional expression: <anonymous enum> vs <anonymous enum> This appears to be from a ?: operator. Possibly that the then and else branches don't evaluate to the same type? Except that in at least one case, it's (matchVp == NULL ? noErr : dupFNErr) And since those are both of type OSErr, which is mac defined... I'm not sure what's up. It also seems to come up when I have other pairs of mac constants... multi-character character constant This one is obvious. The problem is that I actually NEED multi-character constants... -fwritable-strings not compatible with literal CF/NSString I unchecked the "Strings are Read-Only" box in both the project and target settings... and it seems to have had no effect...

    Read the article

  • warnings emitted during 'easy_install'

    - by Matt Anderson
    When I easy_install some python modules, warnings such as: <some module>: module references __file__ <some module>: module references __path__ <some module>: module MAY be using inspect.trace <some module>: module MAY be using inspect.getsourcefile sometimes get emitted. Where (what package / source file) do these messages come from? Why is referencing __file__ or __path__ considered a bad thing?

    Read the article

  • Some stupid warnings

    - by thetna
    I have a number of C source files(both .c and .h files). header files contains a number of functions. Out of those functions, only partially are used in a source .C file.Suppose a.h,b.h are header files and a.c and b.c are .c files. a.h is included in a.c. But only a number of functions those are in a. h are used and rest are not used. After compilation I find following warnings: function XXXX defined but not used. But those XXXX functions which are not used in a.c are used in b.c. So, i can't completely remove those functions too. So , i decided to make a separate file containing only those XXXX functions and included it wherever it is used.Doing this is creating multiple number of header files. Can anybody please suggest me to some effective way to solve this problem.

    Read the article

  • rkhunter: right way to handle warnings further?

    - by zuba
    I googled some and checked out two first links it found: http://www.skullbox.net/rkhunter.php http://www.techerator.com/2011/07/how-to-detect-rootkits-in-linux-with-rkhunter/ They don't mention what shall I do in case of such warnings: Warning: The command '/bin/which' has been replaced by a script: /bin/which: POSIX shell script text executable Warning: The command '/usr/sbin/adduser' has been replaced by a script: /usr/sbin/adduser: a /usr/bin/perl script text executable Warning: The command '/usr/bin/ldd' has been replaced by a script: /usr/bin/ldd: Bourne-Again shell script text executable Warning: The file properties have changed: File: /usr/bin/lynx Current hash: 95e81c36428c9d955e8915a7b551b1ffed2c3f28 Stored hash : a46af7e4154a96d926a0f32790181eabf02c60a4 Q1: Is there more extended HowTos which explain how to deal with different kind warnings? And the second question. Were my actions sufficient to resolve these warnings? a) To find the package which contains the suspicious file, e.g. it is debianutils for the file /bin/which ~ > dpkg -S /bin/which debianutils: /bin/which b) To check the debianutils package checksums: ~ > debsums debianutils /bin/run-parts OK /bin/tempfile OK /bin/which OK /sbin/installkernel OK /usr/bin/savelog OK /usr/sbin/add-shell OK /usr/sbin/remove-shell OK /usr/share/man/man1/which.1.gz OK /usr/share/man/man1/tempfile.1.gz OK /usr/share/man/man8/savelog.8.gz OK /usr/share/man/man8/add-shell.8.gz OK /usr/share/man/man8/remove-shell.8.gz OK /usr/share/man/man8/run-parts.8.gz OK /usr/share/man/man8/installkernel.8.gz OK /usr/share/man/fr/man1/which.1.gz OK /usr/share/man/fr/man1/tempfile.1.gz OK /usr/share/man/fr/man8/remove-shell.8.gz OK /usr/share/man/fr/man8/run-parts.8.gz OK /usr/share/man/fr/man8/savelog.8.gz OK /usr/share/man/fr/man8/add-shell.8.gz OK /usr/share/man/fr/man8/installkernel.8.gz OK /usr/share/doc/debianutils/copyright OK /usr/share/doc/debianutils/changelog.gz OK /usr/share/doc/debianutils/README.shells.gz OK /usr/share/debianutils/shells OK c) To relax about /bin/which as I see OK /bin/which OK d) To put the file /bin/which to /etc/rkhunter.conf as SCRIPTWHITELIST="/bin/which" e) For warnings as for the file /usr/bin/lynx I update checksum with rkhunter --propupd /usr/bin/lynx.cur Q2: Do I resolve such warnings right way?

    Read the article

  • How to get warnings when compiling fx files

    - by jdv-Jan de Vaan
    When I compile DirectX shaders (.fx files), I dont see any compiler warnings unless there was an error in the effect. This happens both when using the offline FXC compiler, as well as calling SlimDx's CompileEffect (which is what we normally do). I could force warnings as errors (/WX), but if you enable that, you get an error that compilation failed, without the warning that caused the problem. So how can I output warnings for shaders that compile properly?

    Read the article

  • How to suppress a compiler warning in C# without using #pragma ?

    - by Dylan Lin
    Hi, I need to suppress a specfic compiler warning in C#. Now I can do it like this: #pragma warning disable 0649 private string _field; #pragma warning restore 0649 Is there a way to do it like the following? [SuppressCompilerWarning("0649")] private string _field; Because I only need to suppress warnings for this field, not a code block. Note: I want to suppress the compiler warning, not the Code-Analysis warning. Thanks!

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >