compiler-warnings

VS2010 (older) installer project - two or more objects have the same target location

巧了我就是萌 提交于 2019-12-01 03:44:13
This installer project was created back in 2004 and upgraded ever since. There are two offending dll files, which produce a total of 4 errors. I have searched online for this warning message and did not find a permanent fix (I did manage to make it go away once until I have done something like a clean, or built in Release, and then in Debug). I also tried cleaning, and then refreshing the dependencies. The duplicated entries are still in there. I also did not find a good explanation for what this error means. Additional warnings are of this nature: Warning 36 The version of the .NET Framework

mixed declarations and codes

早过忘川 提交于 2019-12-01 03:28:50
When I compile function with "gcc -o dene -Wall -ansi -pedantic-errors dene.c" ,gcc emits no error.(can you look a line which starts with char ....,in if loop,) static void remove_negation(char *s,char *s1) { char **cmainp=malloc(sizeof(char*)*1); int len=0;int d=0; int i=0; cmainp[0]=malloc(sizeof(char)*300); len=strlen(s); for(i=0;i<len;++i) { if(s[i]=='-') if(i==0 || s[i-1]==',') /*look*/ {char *p=malloc(sizeof(char)*3); /*look*/ ++i; p[0]=s[i]; p[1]='\0'; strcat(s1,","); strcat(s1,p); free(p); continue; } cmainp[0][d]=s[i]; ++d; } cmainp[0][d+1]='\0'; strcpy(cmainp[0],s); free(cmainp[0]);

Ambiguity in Word Interop code [duplicate]

≯℡__Kan透↙ 提交于 2019-12-01 03:26:37
This question already has an answer here: Compile time warning when using 'Microsoft.Office.Interop.Word._Document.Close' 1 answer I recently posted a question about reading Word files here . The app runs fine however I get this Warning message; Warning Ambiguity between method 'Microsoft.Office.Interop.Word._Document.Close(ref object, ref object, ref object)' and non-method 'Microsoft.Office.Interop.Word.DocumentEvents2_Event.Close'. Using method group. There seems to be some ambiguity from some using namespace and I would like to know how to resolve this. Although the app runs, I would like

Is there a way to show ALL the compiler warnings in Visual Studio 2010?

穿精又带淫゛_ 提交于 2019-12-01 03:09:17
I'm cleaning up a project to get rid of all the warnings, but I can only see the first 100 or so in the Error List pane. This is a problem because we're using Team Server for source control and all the warnings shown are in files that are currently checked out (and therefore I can't modify without making someone else possibly do a lot of work when they check in). I'd like to be able to see the full list so I can continue my cleaning while others are working. In case it makes a difference, The project in question is a VB.NET web application (using the application model). It doesn't seem that I

Treat *some* warnings as errors in Swift?

Deadly 提交于 2019-12-01 03:07:51
Imagine I mark the following method deprecated in Swift: @available(*, deprecated=1.0) func myFunc() { // ... } And I treat warnings as errors in Swift by setting OTHER_SWIFT_FLAGS="-warnings-as-errors" . How do I make it show these deprecation notices as warnings, while still treating the rest of the warnings as errors? It seems like GCC had a pretty good solution to this problem: -Werror // treat all warnings as errors -Wno-error=<warning> // don't treat <warning> as error (e.g. -Wno-error=switch) -Werror=<warning> // treat <warning> as error So if this was Objective-C, I could simply use

Does VB.Net have an equivalent to #pragma warning disable/restore?

自古美人都是妖i 提交于 2019-12-01 03:05:27
I've found a way to disable warnings for an entire VB.NET project, but that is very undesirable. I would like to disable a certain warning for the scope of one method at most. A line-by-line disable and restore would be better. For example, C# has #pragma warning disable (and restore ). Does VB.NET have anything like this? If you are using Visual Studio 2015, the answer is yes, yes it does. The syntax is #Disable Warning BC40000 and #Enable Warning BC40000 https://github.com/dotnet/roslyn/wiki/Languages-features-in-C%23-6-and-VB-14 Unfortunately the answer is no, the VB.NET compiler doesn't

Can I force a compiler error if certain functions are called?

随声附和 提交于 2019-12-01 02:55:59
I have v1 and v2 versions of my software. v1 uses the registry to save settings, with lots of calls to GetProfileInt, etc. v2 now uses an sqlite db to save settings. We are currently developing both branches and are merging new features from v1 to the v2 branch. We currently have to remember to update any registry calls to use the new config db and this has been missed a few times. What I would like is to throw a compiler error if any of the GetProfile... or WriteProfile... functions are used in v2. We're using C++ in Visual Studio 2010. If there's nothing built in can I use the output from a

Why this warning from IBM XL C/C++ compiler?

爱⌒轻易说出口 提交于 2019-12-01 01:09:55
问题 Here's a minimum code example that illustrates the problem: #include <iostream> class Thing { // Non-copyable Thing(const Thing&); Thing& operator=(const Thing&); int n_; public: Thing(int n) : n_(n) {} int getValue() const { return n_;} }; void show(const Thing& t) { std::cout << t.getValue() << std::endl; } int main() { show(3); } This yields the same error: int main() { show( Thing(3) ); } IBM XL C/C++ 8.0 compiler under AIX emits these warnings: "testWarning.cpp", line 24.9: 1540-0306 (W)

Disable ARC with Xcode 5

戏子无情 提交于 2019-12-01 00:52:20
In versions of Xcode previous to 5, we can disable ARC in the project settings when we create the project. Now ARC is causing this problem for me. With an property list file, for the reading step, the compiler gives me an error: "implicit conversion of 'int' to 'id' is disallowed with ARC". I did not have this problem with the same code with Xcode 4. In my property list file, The keys are numbers and also in my viewController.m When I disallow ARC for the target, the warning persists. I don't see how I can add a compiler flag. The code (with French strings): NSString *error; NSString *rootPath

Ambiguity in Word Interop code [duplicate]

青春壹個敷衍的年華 提交于 2019-12-01 00:22:55
问题 This question already has an answer here : Compile time warning when using 'Microsoft.Office.Interop.Word._Document.Close' (1 answer) Closed 3 years ago . I recently posted a question about reading Word files here. The app runs fine however I get this Warning message; Warning Ambiguity between method 'Microsoft.Office.Interop.Word._Document.Close(ref object, ref object, ref object)' and non-method 'Microsoft.Office.Interop.Word.DocumentEvents2_Event.Close'. Using method group. There seems to