suppress-warnings

VS 2017 Command line error D8004

浪子不回头ぞ 提交于 2020-03-23 05:41:49
问题 I'm out of options, I'm trying to work with GoogleTest on Visual Studio 2017 Community but it gives me a lot of warning C4996: 'std::tr1': warning STL4002: The non-Standard std::tr1 namespace and TR1-only machinery are deprecated and will be REMOVED. You can define _SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING to acknowledge that you have received this warning. I want to supress it, so I go under my Project Properties -> C/C++ -> Advanced -> Supress Specific Warnings and I try /wd4996 /wdSTL4002

Can I safely remove unused parameters from Web page event handlers and why are parameters in Page_Load not unused?

走远了吗. 提交于 2020-02-05 04:21:45
问题 In order to be a neat programmer I try to fix the build warnings. But I get stuck with the warnings for unused parameters in page event handlers. Example: public partial class MyPage : System.Web.UI.Page { protected void Page_PreInit(object sender, EventArgs e) { some code not referencing sender or e } If I would follow upon the recommendation of VisualStudio and remove the unused parameters sender and e , I would alter the method signature and the code might not work correctly. However,

Can I safely remove unused parameters from Web page event handlers and why are parameters in Page_Load not unused?

与世无争的帅哥 提交于 2020-02-05 04:21:10
问题 In order to be a neat programmer I try to fix the build warnings. But I get stuck with the warnings for unused parameters in page event handlers. Example: public partial class MyPage : System.Web.UI.Page { protected void Page_PreInit(object sender, EventArgs e) { some code not referencing sender or e } If I would follow upon the recommendation of VisualStudio and remove the unused parameters sender and e , I would alter the method signature and the code might not work correctly. However,

Java: Array of List<MyClass>

末鹿安然 提交于 2020-01-30 13:15:28
问题 I have a spec that requires me to pass an array of lists. The array is always length 2. I am using the following to accomplish this: List<MyClass> [] data = new ArrayList[2]; data[0] = new ArrayList<MyClass>(); data[1] = new ArrayList<MyClass>(); compiles but gives warning: uses unchecked or unsafe operations. I understand that Arrays of generics are not allowed in Java however I cannot change the spec and the above code seems to work nicely. As long as I am conscious that I never reassign

Suppress “stack size cannot be dynamically determined” warnings?

半世苍凉 提交于 2020-01-25 10:21:07
问题 I'm getting a CUDA warning saying ptxas warning : Stack size for entry function '_Z13a_test_kernelv' cannot be statically determined. Now, I know what it means, and there's a SO question about why it happens. What I want to suppress the warning (when compiling with nvcc 10.x). Can I? If so, where exactly do I put the warning suppression #pragma for this? 回答1: Add -Xptxas -suppress-stack-size-warning when compiling with nvcc. 来源: https://stackoverflow.com/questions/59328507/suppress-stack-size

how to supress warning “gets() is deprecated”? [duplicate]

落花浮王杯 提交于 2020-01-21 05:17:25
问题 This question already has answers here : Disable warning messages in GCC through header files? (10 answers) Closed 5 years ago . everytime i try to input my string using gets() function, my compiler gives me warning like shown below. how to get rid of this. what am i doing wrong? test.c:27:2: warning: ‘gets’ is deprecated (declared at /usr/include/stdio.h:638) [-Wdeprecated-declarations] gets(temp); ^ 回答1: Use fgets instead: fgets(temp, sizeof(temp), stdin); gets is deprecated because it's

Why is there a “0 CLEARED by call to connect method” warning in DBI_TRACE?

廉价感情. 提交于 2020-01-15 05:40:31
问题 I'm wondering why a warn appears when using DBI_TRACE=1 upon connecting to any DB. Bonus points to a way to write clean code that doesn't exhibit it. I'm speaking about the !! warn: 0 CLEARED by call to connect method that seems harmless, since the code does work as intended. Note that it doesn't appear without setting the DBI trace mode. Sample Perl code (using SQLite): use warnings; use DBI; DBI->connect("dbi:SQLite:dbname=test.sqlite","","") or die $DBI::errstr; Sample output : DBI 1.612

C# Bitwise-or operator used on a sign-extended operand; consider casting to a smaller unsigned type first

南楼画角 提交于 2020-01-12 11:48:54
问题 I know these warnings are probably pointless.. But anyway I could get rid of them? I got 7 of these warnings. Bitwise-or operator used on a sign-extended operand; consider casting to a smaller unsigned type first This has something to do with the OR operator | I highlighted what gives off the warnings. int result = (int)ror((uint)(v76 ^ (v75 | 0x862D63D3)), (uint)(BitConverter.ToInt32(v4, 72) ^ 0x22)); int v11 = (int)rol((uint)(int)((v8 & v10 | ~v10 & 0xEFCDAAC9) + v3[2] - 1126481991), 17);

How do I suppress Eclipse 3.5's warnings of dead code

元气小坏坏 提交于 2020-01-12 04:18:05
问题 I use a class for detecting email addresses which uses static final booleans to configure the matching behavior. Since I upgraded to Eclipse 3.5 I get warnings about dead code, since Eclipse notices that one branch in this can not be reached: private static final boolean ALLOW_DOMAIN_LITERALS = false; private static final String domain = ALLOW_DOMAIN_LITERALS ? rfc2822Domain : rfc1035DomainName; Oddly enough it is happy with this: private static final String domain; static { if(ALLOW_DOMAIN

How to supress warning for “Deleted feature: PAUSE statement” in gfortran?

浪子不回头ぞ 提交于 2020-01-11 11:06:14
问题 I googled it but i could not find the answer. How can I suppress this warning AND ONLY THIS: Warning: Deleted feature: PAUSE statement at (1) i know I can supress all the warning but I wanna suppress only this one. Or if not possible. suppress warning for delete features. thanks A. 回答1: Compile with -std=legacy or -w (lowercase). Note that -w will suppress all warnings. 来源: https://stackoverflow.com/questions/16350426/how-to-supress-warning-for-deleted-feature-pause-statement-in-gfortran