Is it safe to do this?
double darray[10];
vector<float> fvector;
fvector.insert(fvector.begin(), darray, darray + 10); // double to float conversion
// now work with fvector
VS2008 gives me a warning about the double to float conversion. How do I get rid of this warning? I don't think it makes sense to cast darray to float* as that...
Hi,
When I build my project, I get some warnings about some missing files, but I don't really know why ...
Most are from SDK, but there's one very strange:
ld: warning: directory '/Volumes/Skiiing2/CD/ViewBased/Unknown Path/System/Library/Frameworks' following -F not found
ld: warning: directory '/Developer/Developer SDK 3.x/Platforms...
what is considered best practice in the following snippet:
int foo(struct data *bar, struct info bla) {
if (!bar) {
bla->status = 0;
return;
}
...
}
in fact, it works fine. but i'm feeling uncomfortable with gcc giving me a warning.
here is the actual code:
static int pop(struct stack **stack, struct in...
Just ran my site in chrome and suprisingly it comes up with this warning for each of my .png images:
Resource interpreted as image but transferred with MIME type application/octet-stream.
Anyone seen this before?
Regards
...
I am using the MiKTeX 2.8 distibution for Windows.
We develop software primarily, and use LaTeX to make our user instructions. We use LaTeX because:
It's great under source control for tracking changes etc.
The source files don't suddenly decide to become corrupt, unlike Word documents.
Multiple documents can share single sections, so...
The following C++ code, compiles without warning in Visual Studio 2010:
extern void callFunc( int, int );
struct str_wrapper
{
str_wrapper();
};
extern bool tryParseInt( const str_wrapper
void test()
{
int x, y;
if ( tryParseInt( str_wrapper(), x )
}
}
However if str_wrapper has a user-defined destructor, the code generates t...
I'm trying to install berta (v 0.6.3b) a cms.
and I get this error. The error seems to happen on line 75 of class.bertasecurity.php (view source code)
What is wrong and how can I fix it?
Thank you so much!
Answer
I added this to the class.bertasecurity.php file
session_save_path($_SERVER['DOCUMENT_ROOT'] . '/randomfolder/sessions');
...
I am wondering if there is a way to differentiate between warning messages and error messages in Oracle? Does a Warning message count as an exception? Are warning just errors? Is there a clear difference? And if so, is there a way to catch warning messages explicitly, or information messages?
Thanks for any advice.
...
hi, all:
I am developing an App for iphone. Now i create a ViewController subClass which is named WriteViewController, and i create the view of WriteViewController by override loadView()
function.
The view of WriteViewController is an instance of WriteView. In WriteView, I have a instance
of UIImage which holds an image object. I set t...
Having this code:
typedef volatile int COUNT;
COUNT functionOne( COUNT *number );
int functionTwo( int *number );
I can't get rid of some warnings..
I get this warning 1 at functionOne prototype
[Warning] type qualifiers ignored on
function return type
and I get this warning 2, wherever I call functionTwo with a COU...
I wrote an Erlang module where not all the internal functions are directly called. Instead, there's a couple functions that look something like this:
weird_func(Cmd, Args) ->
?MODULE:Cmd(Args).
It's a simplified example, but you get the idea. The Erlang compiler spits out warnings about unused functions, when in fact they are actu...
I'm working on resolving about 300 warnings and some of the warnings are unnecessary and can be suppressed. However, my question is do I suppress them in the Source - an attribute is added above the method - Or do I suppress them in teh GlobalSuppressioins.cs? Is there any guidance for this, if so where?
Thanks
...
Hello,
XCode is giving me a warning that I can't figure out why.
@interface SFHFKeychainUtils : NSObject {
}
+ (BOOL) storeUsername: (NSString *) username andPassword: (NSString *) password forServiceName: (NSString *) serviceName updateExisting: (BOOL) updateExisting error: (NSError **) error;
@end
In another class I call storeUse...
Is it possible to do some sort of try catch that will catch warnings?
e.g.
if (!$dom->loadHTMLFile($url)) {
//if cant load file handle error my way
}
For the $url I am using I am getting
Warning (2): DOMDocument::loadHTMLFile(MYURL) [domdocument.loadhtmlfile]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden
...
I'm getting the following warning
warning C4996: 'std::_Uninitialized_copy0': 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. See documentation on how to use Visual C++ 'Checked Iterators' c:\program fi...
I'm trying to get rid of some compiler warnings that say strcpy, sprintf, etc are unsafe.
I get why they're unsafe, but I can't think of a good way to fix the code, in a C++ style.
Here's a excerpt of the code:
extList->names[i]=(char *)malloc(length*sizeof(char));
strcpy(extList->names[i],extName); // unsafe
// str...
I've simple class method like
Task TaskSample::Create(void)
{
Task task;
return task;
}
and got warning taking address of temporary. Is something wrong with this code ?
I prefer to not use pointer here
...
I'm integrating some code into my library. It is a complex data structure well optimized for speed, so i'm trying not to modify it too much. The integration process goes well and actually is almost finished (it compiles). One thing is still bothering me. I'm getting the C4200 warning multiple times:
warning C4200: nonstandard extension ...
my index.php page code is-
<?php
if(!$_COOKIE['authorized'] == 1) {
header("Location: login.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org /TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>My Photo Website</title>
<script src="js/j...
I'm using cocos2d with objective C.
I have a class called CrystalineBubble that is currently empty it inherits from CCNode.
#import <Foundation/Foundation.h>
#import "cocos2d.h"
@interface CrystalineBubble : CCNode {
}
@end
When I try to create an instance of that class and alloc it I get the warning
'CrystalineBubble' may not ...