Search Results

Search found 5419 results on 217 pages for 'warning'.

Page 12/217 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • How can I change some specific carps into croaks in Perl?

    - by sid_com
    I tried to catch a carp-warning: carp "$start is > $end" if (warnings::enabled()); ) with eval {} but it didn't work, so I looked in the eval documentation and I discovered, that eval catches only syntax-errors, run-time-errors or executed die-statements. How could I catch a carp warning? #!/usr/bin/env perl use warnings; use strict; use 5.012; use List::Util qw(max min); use Number::Range; my @array; my $max = 20; print "Input (max $max): "; my $in = <>; $in =~ s/\s+//g; $in =~ s/(?<=\d)-/../g; eval { my $range = new Number::Range( $in ); @array = sort { $a <=> $b } $range->range; }; if ( $@ =~ /\d+ is > \d+/ ) { die $@ }; # catch the carp-warning doesn't work die "Input greater than $max not allowed $!" if defined $max and max( @array ) > $max; die "Input '0' or less not allowed $!" if min( @array ) < 1; say "@array";

    Read the article

  • VS2010: Warning on add project reference to Silverlight project from .NET project

    - by nlawalker
    In VS2010, Silverlight 4, .NET 4, I've got a WCF service and a Silverlight app, and Silverlight is accessing the class not with Add Service Reference but by sharing the contract. Naturally, this means I have the contract in a Silverlight class library, and the service has a project reference to that library. Strangely, this results in a /!\ icon on the reference, and a warning: The project 'SilverlightClassLibrary1' cannot be referenced. The referenced project is targeted to a different framework family (Silverlight) However, the reference works fine (I can use the interface in my Silverlight app) and builds fine. Is this a bug? My guess is yes, since the warning is lying and also goes away if you add an assembly reference instead of a project reference. I filed a bug and there's more info here as well.

    Read the article

  • "Gtk-WARNING **: cannot open display: " when using execve to launch a Gtk program on ubuntu

    - by michael
    Hi, I have the following c program which launches a Gtk Program on ubuntu: #include <unistd.h> int main( int argc, const char* argv[] ) { char *args[2] = { "testarg", 0 }; char *envp[1] = { 0 }; execve("/home/michael/MyGtkApp",args,envp); } I get "Gtk-WARNING **: cannot open display: " and my program is not launched. I have tried setting char *envp[1] = {"DISPLAY:0.0"}; and execute 'xhost +' , I dont' see the 'cannot open display' warning, but my program is still not launched. Does anyone know how to fix my problem? Thank you.

    Read the article

  • How to fix "Byte-Order Mark found in UTF-8 File" validation warning

    - by rsturim
    I've got an xhtml page validating under xhtml strict doctype -- but, I getting this warning which I trying to understand -- and correct. Just, how do I locate this errant "Byte-Order Mark". I'm editing my file using Visual Studio--not sure if that helps. Warning Byte-Order Mark found in UTF-8 File. The Unicode Byte-Order Mark (BOM) in UTF-8 encoded files is known to cause problems for some text editors and older browsers. You may want to consider avoiding its use until it is better supported.

    Read the article

  • What does this mean: warning: converting from ‘void (ClassName::*)()’ to ‘void (*)()’

    - by Brendan Long
    I have a member function in a class that has a callback, but the callback isn't strictly neccessary, so it has a default callback, which is empty. It seems to work fine, but I get an annoying warning: warning: converting from ‘void (ClassName::*)()’ to ‘void (*)()’ I'm trying to figure out what it means and how to turn it off (or fix it if I really am doing something wrong). Here's some simple code: class ClassName{ public: void doSomething(void (*callbackFunction)() = (void(*)()) &ClassName::doNothing){ callbackFunction(); } void doNothing(){} }; int main(){ ClassName x; x.doSomething(); return 0; } Note: If I do this (without explicitly casting it as a void(*)()): void doSomething(void (*callbackFunction)() = &ClassName::doNothing) I get this: main.cpp:3: error: default argument for parameter of type ‘void (*)()’ has type ‘void (ClassName::*)()’

    Read the article

  • Help with a compiler warning: Initialization from distinct Objective-C type when types match

    - by Alex Gosselin
    Here is the function where I get the compiler warning, I can't seem to figure out what is causing it. Any help is appreciated. -(void)displaySelector{ //warning on the following line: InstanceSelectorViewController *controller = [[InstanceSelectorViewController alloc] initWithCreator:self]; [self.navController pushViewController:controller animated:YES]; [controller release]; } Interface and implementation for the initWithCreator: method -(InstanceSelectorViewController*)initWithCreator:(InstanceCreator*)creator; -(InstanceSelectorViewController*)initWithCreator:(InstanceCreator*)crt{ if (self = [self initWithNibName:@"InstanceSelectorViewController" bundle:nil]) { creator = crt; } return self; }

    Read the article

  • Warning while downloading setup.exe builded by visual setup project

    - by nosbor
    I've built installer for my(c#, wpf) application by visual setup project. I share my project over internet by web site. But when I download the file I receive warning(actually looks like terrible error or virus) that the application(setup.exe) can harm my computer and apocalypse will come in near future if I will run it. Yes my installer is not signed by MS certificate, but I saw that other installers of others application also don't have cert but the warning is not shown(for instance installer of notepad++). Do you have any suggestions or solution of my problem?

    Read the article

  • Warning on missing custom javadoc tags

    - by flumins
    We create a custom Doclet for our projet to generate a specific documentation for our client. We define some specific tags that are parsed by the doclet when we generate the documentation. Do you know how to ask eclipse to add warning when those special tags are missing in our javadoc comments ? Example of well formed javadoc: /** * @dialogName TECK-01-E-608 * @useVO ServiceVO * @useVO AgentVO */ public class MyDialog extends BaseDialogImpl { ... If @dialogName is missing, the developper should have a warning in eclipse... I look checkstyle a little bit, but I don't understand how to configure it to do such a thing. Thanks in advance for your help.

    Read the article

  • ISO C90 forbids mixed declarations and code Warning [Kernel Module Makefile]

    - by djTeller
    Hi, I'm trying to compile a linux kernel module using a Makefile which looks like so: obj-m += main.o all: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules clean: make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean and i'm getting the following warning: main.c:54: warning: ISO C90 forbids mixed declarations and code I need to switch to C99. After reading i noticed i need to add a flag -std=c99, not sure where it suppose to be added. How do I change the Makefile so it will compile through C99 ? Thanks!

    Read the article

  • Warning when using qsort in C

    - by controlfreak123
    I wrote my comparison function int cmp(const int * a,const int * b) { if (*a==*b) return 0; else if (*a < *b) return -1; else return 1; } and i have my declaration int cmp (const int * value1,const int * value2); and I'm calling qsort in my program like so qsort(currentCases,round,sizeof(int),cmp); when i compile it I get the following warning warning: passing argument 4 of ‘qsort’ from incompatible pointer type /usr/include/stdlib.h:710: note: expected ‘__compar_fn_t’ but argument is of type ‘int (*)(const int *, const int *)’ The program works just fine so my only concern is why it doesn't like the way im using that?

    Read the article

  • UITableView's cellForRowAtIndexPath is not getting called after low memory warning

    - by Jinesh
    I am new to COCOA and Objective C. I am working on an application which have two controllers with one table view in each, clicking an item form this table will lead to another controller to be pushed to the stack. All was working fine till i started handling low memory warning in app delegate. What i am doing in app delegate's applicationDidReceiveMemoryWarning is, deleting all of my model and popping out all controllers to its root view using popToRootViewControllerAnimated. Now my problem starts, once low mem warning is received table's cellForRowAtIndexPath is not getting called. All other methods of UITableViewDataSource is properly called. What i get on screen is a blank white screen. I am testing my app in iPhone OS 3.0 and development is done in Xcode V 3.1.3. Hope you guys can help me to nail this. Thanks in advance, Jinesh.

    Read the article

  • Compiler warning when passing NSError ** as a method parameter

    - by splicer
    I've been scratching my head about this for the last 4 hours, trying out all kinds of little experiments, but I can't seem to figure out what's going wrong. Could this be a compiler bug? Test.m: - (id)initWithContentsOfURL:(NSURL *)aURL error:(NSError **)error { if (!(self = [super init])) { return nil; } return self; } main.m: NSError *error; Test *t = [[Test alloc] initWithContentsOfURL:[NSURL fileURLWithPath:@"/"] error:&error]; Here's the compiler warning (from main.m): warning: incompatible Objective-C types 'struct NSError **', expected 'struct NSDictionary **' when passing argument 2 of 'initWithContentsOfURL:error:' from distinct Objective-C type I'm using the latest versions of Xcode and Snow Leopard.

    Read the article

  • What does "warning: unable to unlink website: Operation not permitted" mean when checking out a Git

    - by James A. Rosen
    I'm trying to create a local branch that tracks a remote branch. Here's what I get: > git checkout master > git push origin origin:refs/heads/myBranch Total 0 (delta 0), reused 0 (delta 0) To [email protected]:myrepo/myproject.git * [new branch] origin/HEAD -> myBranch > git fetch origin > git checkout --track -b myBranch origin/myBranch warning: unable to unlink website: Operation not permitted Branch myBranch set up to track remote branch myBranch from origin. Switched to a new branch 'myBranch' What does "warning: unable to unlink website: Operation not permitted" mean? Did everything work fine?

    Read the article

  • Microsoft _stprintf warning

    - by mnh
    Why I get the following warning for the following code :) Code: _stprintf(m_szFileNamePath,_T("%s"),strFileName); warning C4996: '_swprintf': swprintf has been changed to conform with the ISO C standard, adding an extra character count parameter. To use traditional Microsoft swprintf, set _CRT_NON_CONFORMING_SWPRINTFS. I know _strprintf is a macro which if _UNICODE is defined will evaluate to _swprintf else it will be sprintf. Now what is this _swprintf. There is a function swprintf, but why is _stprintf evaluating to _swprintf instead of swprintf. What is the difference b/w the _xxx and xxx functions? EDIT: Okay there are two definitions for the UNICODE version of _stprintf, which one is included? The one in tchar.h or strsafe.h?

    Read the article

  • Warning: XXX may not respond to YYY

    - by Aurel300
    Hey, I am making some stuff in Objective-C++... And I must say that I am a total newbie when it comes to the Objective-C part... I don't really want to learn it, I kinda just need it for accessing a few Mac APIs (ObjC is such a dumb language). So - compiling with g++ -x objective-c++ - and I somehow keep getting this warning: XXX may not respond to YYY First it was with a NSScreen, now it is with a NSWindow: NSWindow may not respond to +initWithContentRect:styleMask:backing:defer: I saw somewhere that I should cast it to id, but didn't work, throwing absolutely cryptic errors... So - WHAT does this warning actually mean and HOW am I supposed to make it stop?

    Read the article

  • qmake -project command gives QFileInfo warning in Qt 4.6

    - by Pilgrim
    I've upgraded to Qt 4.6 on my Mac (OS 10.5). When I go to a project directory and run: qmake -project Qt returns this warning (although it doesn't say it's a warning, I assume it is since the .pro file gets created anyway): QFileInfo::absolutePath: Constructed with empty filename I did a completely new install thinking that the "upgrade" wasn't clean for whatever reason, it still does it. Any ideas as to why? Here is an example .pro that results from above command: ###################################################################### # Automatically generated by qmake (2.01a) Mon Apr 19 07:39:53 2010 ###################################################################### TEMPLATE = app TARGET = DEPENDPATH += . INCLUDEPATH += . # Input HEADERS += mainwindow.h SOURCES += main.cpp mainwindow.cpp RESOURCES += jquery.qrc

    Read the article

  • Trouble Avoiding Microsoft Outlook's Email Warning

    - by talbright
    I have a set of records in Microsoft Access that I am trying to send in an Email. The email feature works great. Except a warning message pops up every time a message is ready to send, and the user has to click "Allow" or "Deny" for every email sent. I looked up a workaround, and have been following the tutorial for it: http://www.everythingaccess.com/tutorials.asp?ID=Outlook-Send-E-mail-Without-Security-Warning. My problem is that when I put my message in the function it always returns false, and the message fails. Any help would be appreciated. Dim sendMail As Boolean Dim strMessage As String strMessage = Some Message sendMail = FnSafeSendEmail(![Email Id], "Subject", strMessage) The entire "FnSafeSendEmail" function can be found in the link provided. These are the parameters though. Public Function FnSendMailSafe(strTo As String, _ strCC As String, _ strBCC As String, _ strSubject As String, _ strMessageBody As String, _ Optional strAttachments As String) As Boolean The error is thrown on this line of the function. Dim blnSuccessful As Boolean blnSuccessful = objOutlook.FnSendMailSafe(strTo, strCC, strBCC, _ strSubject, strMessageBody, _ strAttachmentPaths)

    Read the article

  • Require Integer Value not Memory Address whilst avoiding Invalid receiver type compiler warning

    - by Dave Anderson
    I have the following code; int days = [[SettingsUtils daysToRetainHistory] intValue]; [retainHistory setText:[NSString stringWithFormat:@"Days to retain History: %d", days]]; [daysToRetainHistory setValue:days animated:NO]; where [SettingsUtils daysToRetainHistory] is as follows; + (int) daysToRetainHistory { return (int)[[NSUserDefaults standardUserDefaults] objectForKey:@"CaseBaseDaysToRetainHistory"]; } I get the compiler warning Invalid receiver type 'int' because I call intValue on an int but unless I do this I can't seem to get the integer value out and always end up with the memory address i.e. 98765432 instead of 9 which ruins the UILabel display [retainHistory] and the UISlider [daysToRetainHistory] value. How do I avoid the compiler warning and still get my integer value in the label and the necessary float value for setting the UISlider value?

    Read the article

  • Avoid warning 'Unreferenced Formal Parameter'

    - by bdhar
    I have a super class like this: class Parent { public: virtual void Function(int param); }; void Parent::Function(int param) { std::cout << param << std::endl; } ..and a sub-class like this: class Child : public Parent { public: void Function(int param); }; void Child::Function(int param) { ;//Do nothing } When I compile the sub-class .cpp file, I get this error warning C4100: 'param' : unreferenced formal parameter As a practise, we used to treat warnings as errors. How to avoid the above warning? Thanks.

    Read the article

  • How to declare a warning on field with AspectJ

    - by Ralph
    I want to declare a warning on all fields Annotated with @org.jboss.weld.context.ejb.Ejb in AspectJ. But I do not find a way how to select that field. I guess the aspect should be something like that: public aspect WrongEjbAnnotationWarningAspect { declare warning : within(com.queomedia..*) && ??? (@org.jboss.weld.context.ejb.Ejb) : "WrongEjbAnnotationErrorAspect: use javax.ejb.EJB instead of weld Ejb!"; } Or is it impossible to declare warnings on fields at all?

    Read the article

  • Avoid incompatible pointer warning when dealing with double-indirection

    - by fnawothnig
    Assuming this program: #include <stdio.h> #include <string.h> static void ring_pool_alloc(void **p, size_t n) { static unsigned char pool[256], i = 0; *p = &pool[i]; i += n; } int main(void) { char *str; ring_pool_alloc(&str, 7); strcpy(str, "foobar"); printf("%s\n", str); return 0; } ... is it possible to somehow avoid the GCC warning test.c:12: warning: passing argument 1 of ‘ring_pool_alloc’ from incompatible pointer type test.c:4: note: expected ‘void **’ but argument is of type ‘char **’ ... without casting to (void**) (or simply disabling the compatibility checks)? Because I would very much like to keep compatibility warnings regarding indirection-level...

    Read the article

  • PHP: documentElemnt->childNodes warning

    - by jun
    $xml = file_get_contents(example.com); $dom = new DomDocument(); $dom->loadXML($xml); $items = $dom->documentElement; foreach($items->childNodes as $item) { $childs = $item->childNodes; foreach($childs as $i) { echo $i->nodeValue . "<br />"; } } Now I get this warning in every 2nd foreach: Warning: Invalid argument supplied for foreach() in file_example.php on line 14 Please help guys. Thanks!

    Read the article

  • PHP: documentElement->childNodes warning

    - by jun
    $xml = file_get_contents(example.com); $dom = new DomDocument(); $dom->loadXML($xml); $items = $dom->documentElement; foreach($items->childNodes as $item) { $childs = $item->childNodes; foreach($childs as $i) { echo $i->nodeValue . "<br />"; } } Now I get this warning in every 2nd foreach: Warning: Invalid argument supplied for foreach() in file_example.php on line 14 Please help guys. Thanks!

    Read the article

  • php session_start() warning

    - by Eniasharmila Karunakaran
    I'm new to php.. Im trying to get value from session. Below is my code. Set session in login page session_start(); $_SESSION["username"] = $username ; $_SESSION["password"] = $password ; $_SESSION["companycode"] = $companycode; Get the session if(! isset($_SESSION)) session_start(); $a=$_SESSION["companycode"]; echo $a; But i got the warning in my page: Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at C:\xampp\htdocs\lucent\clientlogin.php:216) in C:\xampp\htdocs\lucent\clientlogin.php on line 219 Please help. Thanks

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >