Hi,
Got some code that is not mine and its producing this warning atm:
iehtmlwin.cpp(264) : warning C4996: 'std::basic_string<_Elem,_Traits,_Ax>::copy': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. ...
This warning is triggered multiple times in my code by the same declaration, which reads :
// Spreadsheet structure
typedef struct SPREADSHEET
{
int ID; // ID of the spreadsheet
UINT nLines; // Number of lines
void CopyFrom(const SPREADSHEET* src)
{
ID = src->ID;
...
This piece of code :
Int32 status;
printf("status : %x", status)
gives me the following warning :
jpegthread.c:157: warning: format '%x' expects type 'unsigned int', but argument 3 has type 'Int32'
I know I can get read of it by casting the type, but is it possible with a gcc CFLAG to get rid of that particular type of warning, and...
The exact warning I get is
warning C4715: 'hand::show' : not all control paths return a value
and hand::show is
std::ostream& hand::show(std::ostream& os) const
{
if(side == left)
{
return os<<display[0]<<display[1]<<display[2]<<display[3]<<display[4];
}
if(side == right)
{
return os<<display[4]<<display...
I have a bunch of warnings C4510 and C4610 when I use std::list with my class. It is a warning stating that default constructor is not available, and I want to disable them.
When I put:
#pragma warning(disable: 4510)
inside .cpp file that is instantiating this list nothing happens.
I tried placing this pragmas around function where ...
When I try to do things like this:
char* prefix = "Sector_Data\\sector";
char* s_num = "0";
std::strcat(prefix, s_num);
std::strcat(prefix, "\\");
and so on and so forth, I get a warning
warning C4996: 'strcat': This function or variable may be unsafe. Consider using strcat_s instead.
Why is strcat considered unsafe, and is there a...
Hi,
I have my Eclipse configured to show warnings on missing javadoc comments and tags for public elements. That comes very usefull for me in order to keep my code well documented.
But sometimes I have a class, where I have several constants describing for example states of DFA or something.. theres no need to document theese constant...
I have a method called FormattedJoin() in a utility class called ArrayUtil. I tried renaming FormattedJoin() to just Join() because it's behavior is similar to .NET's string.Join() so I figured it made sense to use the same name. However, when I try to use Visual Studio to rename the method, I get this warning:
This member may have c...
This code illustrates something that I think should be treated as bad practice, and elicit warnings from a compiler about redefining or masking a variable:
#include <iostream>
int *a;
int* f()
{
int *a = new int;
return a;
}
int main()
{
std::cout << a << std::endl << f() << std::endl;
return 0;
}
Its output (compiled with ...
What's the closest GCC equivalent to this MSVC preprocessor code?
#pragma warning( push ) // Save the current warning state.
#pragma warning( disable : 4723 ) // C4723: potential divide by 0
// Code which would generate warning 4723.
#pragma warning( pop ) // Restore warnings to previous s...
Hi,
I am creating an excel file using php like this:
header("Content-type: application/vnd.ms-excel");
header("Content-Disposition: attachment; filename=invoice.xls");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
echo "<table><tr><th>Test</th></tr><tr><td>...</td></tr></table>";
When I try open the file, excel...
Is there a way to force the Delphi compiler to display all hints and warnings all the time?
Here is the behavior that I am currently seeing in Delphi 6:
Check out fresh copy of my application from source control
Open project in Delphi and Compile
All hints and warnings for the project are displayed
Make a change in one unit
Compile
On...
I don't know what caused VS to start thinking it needs to publish my project, but now whenever I build it, I get several "Unable to apply publish properties for item 'blah'" warnings. How do I stop VS 2005's publishing facilities from working on my project completely? I use InstallShield so I have no use for VS's publishing system.
...
When dealing with any framework with which you are not 100% familiar, I've found it advisable to attempt to understand and clean up any extraneous warnings, if only so that you have a better chance of noticing real errors when they occur.
The one I've been getting lately has been:
DEPRECATION WARNING: @model will not longer be implici...
My code looks like this:
char * decode_input(char ch)
{
switch(ch) {
case 'g':
return "get";
break;
case KEY_F(9):
return "quit";
break;
default:
return "unknown"...
run.php is just a normal PHP file:
[root@www4 robot]# php run.php
No log handling enabled - turning on stderr logging
Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none)
Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none)
Cannot find module (UCD-DISKIO-MIB): At line 0 in (none)
Cannot find module (TCP-MIB): At line ...
In my current project inside the file ViewController.m, running the method:
[[connection writer] writeData: data];
returns the warning:
warning: multiple methods named 'writeData:' found
I am attempting to call the method:
- (void) writeData: (NSData*)data
in TCPWriter.m. Unfortunately there are two other writeData methods
- (...
I have an Ant file that compiles my program. I want the javac task to fail if any warning was reported by the compiler. Any clue on how to do that?
...
Edit: I reported this as a bug on the Microsoft Connect site here.
Edit 2: Microsoft will not fix this bug (at least not in VS2010).
User defined warnings are only shown in the Error List window for one file per project. So if you put the #warning directive in several files of your project, you will not see any warnings after build for...
I am a beginner in PHP.
I am receiving the following errors. I cannot view the error from my computer on FF, IE, and Chrome, but yet I see the error up top when browsing from another computer's browser.
Warning: session_start() [function.session-start]: open(/tmp/sess_c464nadk4jsn4u43mpqipkjbr7, O_RDWR) failed: Permission denied (13) i...