f



How to get rid of warnings?

I have the maximum number of warnings during PHP development. How can I
get rid of these warnings without turning them off in PHP?

Here's the code I have:

<form method="POST" action="eat.php">
<select name="lunch[  ]" multiple>
<option value="pork">BBQ Pork Bun</option>
<option value="chicken">Chicken Bun</option>
<option value="lotus">Lotus Seed Bun</option>
<option value="bean">Bean Paste Bun</option>
<option value="nest">Bird-Nest Bun</option>
</select>
<input type="submit" name="submit">
</form>

Selected buns: <br/>
<?php
foreach ($_POST['lunch'] as $choice) {
    print "You want a $choice bun. <br/>";
}
?>


And I get: Warning: Invalid argument supplied for foreach() in
C:\lighttpd\htdocs\index.php on line 17

Is there a way to give the 'lunch' variable a default value if
undefined?
Thank you.

0
8/25/2006 2:46:07 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

9 Replies
657 Views

Similar Articles

[PageSpeed] 45

Lenard Redwood wrote:
> I have the maximum number of warnings during PHP development. How can I
> get rid of these warnings without turning them off in PHP?
> 
> Here's the code I have:
> 
> <form method="POST" action="eat.php">
> <select name="lunch[  ]" multiple>
> <option value="pork">BBQ Pork Bun</option>
> <option value="chicken">Chicken Bun</option>
> <option value="lotus">Lotus Seed Bun</option>
> <option value="bean">Bean Paste Bun</option>
> <option value="nest">Bird-Nest Bun</option>
> </select>
> <input type="submit" name="submit">
> </form>
> 
> Selected buns: <br/>
> <?php
> foreach ($_POST['lunch'] as $choice) {
>     print "You want a $choice bun. <br/>";
> }
> ?>
> 
> 
> And I get: Warning: Invalid argument supplied for foreach() in
> C:\lighttpd\htdocs\index.php on line 17
> 
> Is there a way to give the 'lunch' variable a default value if
> undefined?
> Thank you.
> 

Make sure $_POST['lunch'] is set and is an array.  Check out isset() and 
is_array().

And ALWAYS validate information coming from the user.  NEVER assume 
you're getting something.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
8/25/2006 3:18:37 AM
try
 <?php
foreach ($lunch as $choice) {
    print "You want a $choice bun. <br/>";
}
?>

0
jueljust (9)
8/25/2006 4:06:03 AM
Gucci wrote:
> try
>  <?php
> foreach ($lunch as $choice) {
>     print "You want a $choice bun. <br/>";
> }
> ?>
> 

RED ALERT ! never work with register_globals on
0
8/25/2006 5:51:05 AM
<?php

if(is_array($_POST['lunch']) && count($_POST['lunch'])) {
    foreach ($_POST['lunch'] as $choice) {
        print "You want a $choice bun. <br/>";
    }
}

?>

0
8/25/2006 6:59:33 AM
Manish wrote:
> <?php
>
> if(is_array($_POST['lunch']) && count($_POST['lunch'])) {
>     foreach ($_POST['lunch'] as $choice) {
>         print "You want a $choice bun. <br/>";
>     }
> }
>
> ?>

Thank you. Now I get this error:

Notice: Undefined index: lunch in C:\lighttpd\htdocs\index.php on line
17

0
8/25/2006 12:43:08 PM
Lenard Redwood wrote:
> Manish wrote:
> 
>><?php
>>
>>if(is_array($_POST['lunch']) && count($_POST['lunch'])) {
>>    foreach ($_POST['lunch'] as $choice) {
>>        print "You want a $choice bun. <br/>";
>>    }
>>}
>>
>>?>
> 
> 
> Thank you. Now I get this error:
> 
> Notice: Undefined index: lunch in C:\lighttpd\htdocs\index.php on line
> 17
> 

See my earlier suggestion.  Before checking if it's an array, you should 
see if it's even set:

if(isset($_POST['lunch']) && is_array($_POST['lunch']) && 
count($_POST['lunch'])) {
     foreach ($_POST['lunch'] as $choice) {
         print "You want a $choice bun. <br>";
     }
}

BTW - <br/> is valid for xml but not html.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
0
jstucklex (14659)
8/25/2006 12:57:26 PM
Jerry Stuckle wrote:
> See my earlier suggestion.  Before checking if it's an array, you should
> see if it's even set:
>
> if(isset($_POST['lunch']) && is_array($_POST['lunch']) &&
> count($_POST['lunch'])) {
>      foreach ($_POST['lunch'] as $choice) {
>          print "You want a $choice bun. <br>";
>      }
> }


Yes! Thank you Jerry! Working great now :)

0
landemaine (50)
8/25/2006 1:12:39 PM
Jerry Stuckle wrote:
> Lenard Redwood wrote:
>   
>> Manish wrote:
>>
>>     
>>> <?php
>>>
>>> if(is_array($_POST['lunch']) && count($_POST['lunch'])) {
>>>    foreach ($_POST['lunch'] as $choice) {
>>>        print "You want a $choice bun. <br/>";
>>>    }
>>> }
>>>
>>> ?>
>>>       
>> Thank you. Now I get this error:
>>
>> Notice: Undefined index: lunch in C:\lighttpd\htdocs\index.php on line
>> 17
>>
>>     
>
> See my earlier suggestion.  Before checking if it's an array, you should 
> see if it's even set:
>
> if(isset($_POST['lunch']) && is_array($_POST['lunch']) && 
> count($_POST['lunch'])) {
>      foreach ($_POST['lunch'] as $choice) {
>          print "You want a $choice bun. <br>";
>      }
> }
>
> BTW - <br/> is valid for xml but not html.
>
>   
"&& count($_POST['lunch'])" seems superfluous here. If it's an array 
(empty or not), then foreach will not issue a warning.

-- 
*****************************
 Chuck Anderson � Boulder, CO
 http://www.CycleTourist.com
*****************************
0
8/25/2006 2:18:07 PM
Jerry Stuckle wrote:
> See my earlier suggestion.  Before checking if it's an array, you should
> see if it's even set:
>
> if(isset($_POST['lunch']) && is_array($_POST['lunch']) &&
> count($_POST['lunch'])) {
>      foreach ($_POST['lunch'] as $choice) {
>          print "You want a $choice bun. <br>";
>      }
> }
>
> BTW - <br/> is valid for xml but not html.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================

<br /> for XHTML
<br> for HTML

0
8/27/2006 10:42:41 PM
Reply:

Similar Artilces:

Getting rid of warnings
I am trying to get rid of a few annoying warnings in my project - I have got rid of most of them but a few remain which I cant seem to get rid of. The first one is while using FD_SET/FD_CLR for adding and clearing sockets. I get the warning: warning C4127: conditional expression is constant The other one is using SetWindowLongPtr. I did have two warnings for this but managed to cast the result to get rid of one warning. I cant get rid of the last warning though. My code is: mOldWndProc = (WNDPROC)(long long)SetWindowLongPtr(mHwnd, GWLP_WNDPROC, (LONG_PTR)SkinWndProc); ...

How do I get rid of this warning?
Patterned after the solution suggested in the perlmodlib man page, I wrote the following code: ==================== This is file b.pm #!/usr/local/bin/perl -w use strict; package b; sub f { print "BBBBBBBB @_\n"; } eval join('', <main::DATA>) || die $@ unless caller(); 1 __END__ package main; b::f(@ARGV); ================================= When called this from the command line, say: b.pm X it works fine. But when I use it as a module, say from this context: ===================== This is file p.pl #!/usr/local/bin/perl -w use strict; use b; b::f('X'); ====...

How do you get rid of dynamic linker warning
I have just ported a large application suite to sco 5.0.7. The application suite runs fine. It's passed our many regression test. The only annoyance is when we run a program, we get the "warning": dynamic linker: prog123: warning: copy relocation size mismatch for symbol Xpcs_work_int How do you stop the dynamic linker telling me this every time I run a program? Surely there is an environment variable to tell it "I'm not interested, I know there is a coding problem, I don't want to fix it, stop telling me this." I'm using the same code on AIX, HPUX, Linu...

Get rid of unused parameter warning?
I have an abstract base class which defines an interface to a function which takes 3 arguments. From that ABC I define a set of derived classes which implements the base class' interface. The thing is, some derived classes don't use some of the parameters, which causes the compiler to throw warnings. As I'm not using those parameters intentionally, those warnings tend to be a bit annoying. So, does anyone happen to know a good standard way to get the compiler to stop warning about those specific instances where a parameter isn't used? Thanks in advance, Rui Maciel On Sep 25, 3:08=A0pm, Rui Maciel <rui.mac...@gmail.com> wrote: > I have an abstract base class which defines an interface to a function wh= ich takes 3 arguments. =A0 > From that ABC I define a set of derived classes which implements the base= class' interface. =A0The > thing is, some derived classes don't use some of the parameters, which ca= uses the compiler to throw > warnings. =A0As I'm not using those parameters intentionally, those warni= ngs tend to be a bit > annoying. > > So, does anyone happen to know a good standard way to get the compiler to= stop warning about those > specific instances where a parameter isn't used? One way is not to name the parameters, give only type: int foo( int ) { return 0; } For me it is fine. The downside that some claim it not documenting the intention well ...

How to get rid of obsolete function warning
Hi all, Since I'm using randint function I receive: Warning: This is an obsolete function and may be removed in the future. Please use RANDI instead. To disable this warning, type warning('off','comm:obsolete:randint'); but everytime I startup MATLAB I have to do "warning('off','comm:obsolete:randint');" How can I get rid of that warning permanently? Elnaz "Elnaz " <ebsadeghian@gmail.com> wrote in message <kjvlb2$6op$1@newscl01ah.mathworks.com>... > Hi all, > Since I'm using randint function I receive: > Warning: This is an obsolete function and may be removed in the > future. > Please use RANDI instead. > To disable this warning, type > warning('off','comm:obsolete:randint'); > but everytime I startup MATLAB I have to do "warning('off','comm:obsolete:randint');" > How can I get rid of that warning permanently? > > Elnaz Why not just switch to randi? It won't be long before randint does disappear, and then you will need to do so anyway. John On 4/8/2013 6:54 PM, Elnaz wrote: > Hi all, > Since I'm using randint function I receive: > Warning: This is an obsolete function and may be removed in the > future. > Please use RANDI instead. > To disable this warning, type > warning('off','comm:obsolete:r...

how to get rid of warnings from required fields?
Hi, I made a form based on one table that has several required fields. If in the form, I leave some of them blank and close the form using 'X', I get 2 warning messages, 1st is "... field is required." 2nd is "if you close, the data will be lost." How can I get rid of these or, if possible, I would like to replace them with my own. I tried Form Close event, doesn't work. Anyone could help me here? Thanks in advance. ming On 13 May 2006 15:42:39 -0700, swingingming wrote: > Hi, I made a form based on one table that has several required fields. > If in the form, I leave some of them blank and close the form using > 'X', I get 2 warning messages, 1st is "... field is required." 2nd is > "if you close, the data will be lost." > How can I get rid of these or, if possible, I would like to replace > them with my own. I tried Form Close event, doesn't work. > Anyone could help me here? Thanks in advance. > ming Here's how you can find the correct error and show your own message for any of the form level errors. First code the Form's Error event: MsgBox "Error#: " & DataErr ' Display the error number Response = acDataErrDisplay ' Display Default message Then open the form and intentionally make that error. The message box will display the error number and the default error message. Next, go back to the error event and change that code to: If DataErr = XXXX...

How to get rid of warning message from proc dataset
Hey, guys, I submitted the followin codes, and get warning message as "Warning: No matching members in directory". I cheked some papers, SAS gave such message when library is not specified. But in my case, the library is defined. And the warning still exists the second time I run the code. Does any one know how to get rid of the warning? (note: try is a sas dataset) . Many thanks. libname temp 'C:\Documents and Settings\Desktop\test'; libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; proc datasets; copy in=temp out=t2path; select try; quit; Mindy ...

XPATH
Hello, I have an Xpath expression: //foo[translate(text(),"ABCDEFGHIJKLMNOPQRSTUVWXYZ","abcdefghijklmnopqrstuvwxyz")="'bla'"] Here i check if i can find bla in a foo tag - and its case insensitive. If i use this expression I get warnings (failures?): Unrecognized escape \Q passed through at (eval 4) line 1. Unrecognized escape \E passed through at (eval 4) line 1. Unrecognized escape \Q passed through at (eval 4) line 1. Unrecognized escape \E passed through at (eval 4) line 1. and I dont know what they mean? if i check without the case sensitive tes...

Re: How to get rid of warning message from proc dataset
Mindy, Do you still get the warning if you use double quotes {") rather than single quotes (') in the libname statements? Art ------ On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_sas@YAHOO.COM> wrote: >Hey, guys, > >I submitted the followin codes, and get warning message as "Warning: >No matching members in directory". I cheked some papers, SAS gave such >message when library is not specified. But in my case, the library is >defined. >And the warning still exists the second time I run the code. Does any >one know how to get rid of the warning? (note: try is a sas dataset) . >Many thanks. > >libname temp 'C:\Documents and Settings\Desktop\test'; >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; > >proc datasets; > copy in=temp out=t2path; > select try; >quit; >Mindy On Oct 1, 11:32 am, art...@NETSCAPE.NET (Arthur Tabachneck) wrote: > Mindy, > > Do you still get the warning if you use double quotes {") rather than > single quotes (') in the libname statements? > > Art > ------ > > > > On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_...@YAHOO.COM> wrote: > >Hey, guys, > > >I submitted the followin codes, and get warning message as "Warning: > >No matching members in directory". I cheked some papers, SAS gave such > >message when library is not specified. But in my case, ...

How to get rid of warning message from proc dataset #2
Hey, guys, I submitted the followin codes, and get warning message as "Warning: No matching members in directory". I cheked some papers, SAS gave such message when library is not specified. But in my case, the library is defined. And the warning still exists the second time I run the code. Does any one know how to get rid of the warning? (note: try is a sas dataset) . Many thanks. libname temp 'C:\Documents and Settings\Desktop\test'; libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; proc datasets; copy in=temp out=t2path; select try; quit; Mindy ...

Re: How to get rid of warning message from proc dataset #4
Coding NOLIST also works. 52 proc datasets nolist; 53 copy in=temp out=t2path; 54 select try; 55 quit; NOTE: Copying TEMP.TRY to T2PATH.TRY (memtype=DATA). NOTE: There were 1 observations read from the data set TEMP.TRY. NOTE: The data set T2PATH.TRY has 1 observations and 0 variables. NOTE: PROCEDURE DATASETS used (Total process time): real time 0.01 seconds cpu time 0.00 seconds I think RROC DATASET is try applying the SELECT to the list of library members it prints by default. With no LIBRARY= option it defaults to WORK, but TRY does not exist. I had to see your example to understand the question. On 10/2/07, Howard Schreier <hs AT dc-sug DOT org> <nospam@howles.com> wrote: > On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_sas@YAHOO.COM> wrote: > > >Hey, guys, > > > >I submitted the followin codes, and get warning message as "Warning: > >No matching members in directory". I cheked some papers, SAS gave such > >message when library is not specified. But in my case, the library is > >defined. > >And the warning still exists the second time I run the code. Does any > >one know how to get rid of the warning? (note: try is a sas dataset) . > >Many thanks. > > > >libname temp 'C:\Documents and Settings\Desktop\test'; > >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; > > > &g...

[fourier] getting rid of irritating font-encoding-changes warnings
When using the `fourier' package, one gets the warnings (harmless, they tell me) about font-encoding changes following at the end of my post. How can I get LaTeX not to mention them anymore? They take up valuable screen real-estate in the "Log & Messages"-window of my editor (Kile). TIA, Erik The warnings I spoke of: /usr/share/texmf/tex/latex/fourier/fourier.sty:50: Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `normal' on input line 50. Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `normal' /usr/share/texmf/tex/latex/fourier/fourier.sty:50: Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `bold' on input line 50. Encoding `OT1' has changed to `T1' for symbol font(Font) `operators' in the math version `bold' /usr/share/texmf/tex/latex/fourier/fourier.sty:59: Encoding `OML' has changed to `FML' for symbol font(Font) `letters' in the math version `normal' on input line 59. Encoding `OML' has changed to `FML' for symbol font(Font) `letters' in the math version `normal' /usr/share/texmf/tex/latex/fourier/fourier.sty:59: Encoding `OML' has changed to `FML' for symbol font(Font) `letters' in the math version `bold' on input line 59. Encoding `OML' has changed to `FML' for symbol font(Font) `letters...

even after proper error checking, I still get PHP warnings
I've this class method, which makes sure I've got a variable that is a resource: function close() { if (is_resource($this->datastoreResultsPointer)) { mysql_free_result($this->datastoreResultsPointer); mysql_close(); } } all the same, I'm getting these PHP errors: Warning: mysql_free_result(): 286 is not a valid MySQL result resource in /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsIncludes/McDatastoreResultsMySql.php on line 89 Warning: mysql_close(): no MySQL-Link resource supplied in /home/httpd/vhosts/monkeyclaus.org/httpdocs/media/audio/pdsI...

Re: How to get rid of warning message from proc dataset #2
Mindy, Your code works, on my system, as originally written. Thus, two more questions: (1) does try exist in libname temp? and (2) is try a SAS dataset of the same version as the version of SAS you a running? Art ------- On Mon, 1 Oct 2007 20:43:44 -0000, Mindy <master2005_sas@YAHOO.COM> wrote: >On Oct 1, 11:32 am, art...@NETSCAPE.NET (Arthur Tabachneck) wrote: >> Mindy, >> >> Do you still get the warning if you use double quotes {") rather than >> single quotes (') in the libname statements? >> >> Art >> ------ >> >> >> >> On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_...@YAHOO.COM> wrote: >> >Hey, guys, >> >> >I submitted the followin codes, and get warning message as "Warning: >> >No matching members in directory". I cheked some papers, SAS gave such >> >message when library is not specified. But in my case, the library is >> >defined. >> >And the warning still exists the second time I run the code. Does any >> >one know how to get rid of the warning? (note: try is a sas dataset) . >> >Many thanks. >> >> >libname temp 'C:\Documents and Settings\Desktop\test'; >> >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; >> >> >proc datasets; >> > copy in=temp out=t2path; >> > select try; >> >quit; &g...

Re: How to get rid of warning message from proc dataset #3
On Mon, 1 Oct 2007 10:59:47 -0700, Mindy <master2005_sas@YAHOO.COM> wrote: >Hey, guys, > >I submitted the followin codes, and get warning message as "Warning: >No matching members in directory". I cheked some papers, SAS gave such >message when library is not specified. But in my case, the library is >defined. >And the warning still exists the second time I run the code. Does any >one know how to get rid of the warning? (note: try is a sas dataset) . >Many thanks. > >libname temp 'C:\Documents and Settings\Desktop\test'; >libname t2path 'C:\Documents and settings\Desktop\test\sub_m'; > >proc datasets; > copy in=temp out=t2path; > select try; >quit; >Mindy Try removing IN=TEMP from the COPY statement and instead code LIBRARY=TEMP in the PROC statement. It actually seems to work either way, but using 9.1.3 I do see that spurious warning. libname temp 'c:\temp\a'; libname t2path 'c:\temp\aa'; data temp.try; run; proc datasets; copy in=temp out=t2path; select try; quit; proc datasets library=temp; copy out=t2path; select try; quit; ...

empty variables
I have perl code which should do some action only if: - the variable does not begin with "#" (commented out), - the variable is not empty use strict; use warnings; my @array = ("# Comment", "/usr/bin/binary --test", ""); foreach my $var (@array) { my @execargs = split(/#/, $var); if ( $execargs[0] ne '' ) { print "$var 0: |$execargs[0]|\n" } } Unfortunately, it shows uninitialized value warnings for the empty variable (""): $ perl test.pl /usr/bin/binary --test 0: |/usr/bin/binary --test| Use of uninitia...

open_basedir restrictions are set to off in php.ini yet I still get the warnings
What is this about? If I ssh to my server and look at php.ini I see this: ; open_basedir, if set, limits all file operations to the defined directory ; and below. This directive makes most sense if used in a per- directory ; or per-virtualhost web server configuration file. This directive is ; *NOT* affected by whether Safe Mode is turned On or Off. ;open_basedir = but on the site I'm getting this error: Warning: main(): open_basedir restriction in effect. File(/home/httpd/ vhosts/monkeyclaus.org/httpdocs/media/audio/site_specific_files/ config.php) is not within the allowed path(s): (/home/httpd/vhosts/ monkeyclaus.org/httpsdocs:/tmp) in /home/httpd/vhosts/monkeyclaus.org/ httpsdocs/store.php on line 1 what is up? lawrence k <lkrubner@geocities.com> wrote: > What is this about? If I ssh to my server and look at php.ini I see > this: > > ; open_basedir, if set, limits all file operations to the defined > directory > ; and below. This directive makes most sense if used in a per- > directory > ; or per-virtualhost web server configuration file. So, is it perhaps set in httpd.conf or another included configuration file of the web server? And what does phpinfo() tell you (be sure you're looking at the right php.ini..) -- Rik Wasmus Posted on Usenet, not any forum you might see this in. Ask Smart Questions: http://tinyurl.com/anel ...

i am getting the php coding while running the php..
i have information.php file that file contain following coding <?php echo phpinfo(); ?> while i calling the URL ("http://localhost/information.php"). i am getting the coding <?php echo phpinfo(); ?> not show the php information...... i am new to the php can you help me? <mekalai82@gmail.com> wrote in message news:ea7db46d-a03d-497a-b38b-c54d75f266f8@h11g2000prf.googlegroups.com... >i have information.php file that file contain following coding <?php > echo phpinfo(); ?> > while i calling the URL ("http://localhost/information.php"). > > i am getting the coding <?php echo phpinfo(); ?> <?php phpinfo(); ?> -- Richard On Feb 29, 11:30 am, "rf" <r...@invalid.com> wrote: > <mekala...@gmail.com> wrote in message > > news:ea7db46d-a03d-497a-b38b-c54d75f266f8@h11g2000prf.googlegroups.com... > > >i have information.php file that file contain following coding <?php > > echo phpinfo(); ?> > > while i calling the URL ("http://localhost/information.php"). > > > i am getting the coding <?php echo phpinfo(); ?> > > <?php phpinfo(); ?> > > -- > Richard for example i have that coding.......my coding is run in the some other machine. but while i am trying in my system i am getting the whatever i have typed in file.... that content will be displaying......... does not provide the result of that file coding.......

How to get rid of "hex/oct constants > sys.maxint" warning?
I'm getting tired of seeing meaningless warnings from my code, but I can't figure out how to get rid of them: For example: fcntl.ioctl(fd,0xc0047a80,s) causes FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up Firstly, I have no idea what that error means in this context. 0xc0047a80 isn't intended to be an integer (either positive or negative): it's just a chunk of 32 bits. Googling the newsgroup came up with the suggestion that putting an "L" on the end of the constant would eliminate the warning, but it causes an error: fcntl.ioctl(fd,0xc0047a80L,s) causes OverflowError: long int too large to convert to int So, that doesn't work. How _do_ I get rid of the warning? Is there a way to tell Python that the constant isn't an integer, it's just a bit pattern? -- Grant Edwards grante Yow! Mr and Mrs PED, can at I borrow 26.7 visi.com On 11 Aug 2004, Grant Edwards wrote: > How _do_ I get rid of the warning? Is there a way to tell > Python that the constant isn't an integer, it's just a bit > pattern? The best way is to tell Python to silence the warning: >>> 0xc0047a80 FutureWarning >>> import warnings >>> warnings.simplefilter('ignore',FutureWarning) >>> 0xc0047a80 -1073448320 fcntl() do...

Thumb calling ARM asm snippet, can't get rid of the warning(+)
Hi Group, Just in case someone have dealt with such an issue already and can give me an answer off the top of his head. I'm compiling a project in Thumb mode. I've got a file myfunc.c that I also compile in Thumb. This file contains an assembly snippet written in ARM instruction set. It's not an inline asm snippet within a C function but rather a whole function in asm. It looks like this: asm("\n\ .align 2\n\ .code 32\n\ .internal MULADD\n\ MULADD: \n\ STMFD sp!,{r4-r11,lr}\n\ [snip] LDMFD sp!,{r4-r11,lr}\n\ BX lr\n\ "); // end of asm() Th...

How to get rid of this warning?: dereferencing type-punned pointer will break strict-aliasing rules
I ma cleaning up so,me program code using -Wall in gcc, but I do not understand this error message (things work OK), how to get rid of the error message, or what is wrong here? void *video_routine() { ...... } Using this: pthread_create( (pthread_t *)&play_thread, NULL , &video_routine, NULL); gives me the following warning with -Wall warning: dereferencing type-punned pointer will break strict-aliasing rules Hello, Jan Panteltje wrote: > warning: dereferencing type-punned pointer will break strict-aliasing > rules Try -fno-strict-aliasing as optio...

what's the 'right' way to get rid of size_t to int conversion warnings?
Surely there is something clever to do here, besides turning off the warning? Glen glen stark wrote: > Surely there is something clever to do here, besides turning off the > warning? Use size_t instead of int. Or perhaps: size_t size = 5; int i = static_cast<int>(size); Ben Pope -- I'm not just a number. To many, I'm known as a string... On Tue, 21 Mar 2006 17:22:06 +0100, glen stark <stark@ife.ee.ethz.ch> wrote: >Surely there is something clever to do here, besides turning off the >warning? Yes. Instead of writing this: vector<something> v...

About PHP::: Error/Problem PHP Warning: mysql_fetch_array():
Hi Everyone ============================================================== About PHP::: Error/Problem PHP Warning: mysql_fetch_array(): ============================================================== In the past i use my code/script work fine with Mandrake 9.1 - 10.1 ( + apache ,mysql ) Now i move to redhat EL4 with the same code/script I got error can't login to my code. and found error on /var/log/httpd/error_log like this PHP Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /var/www/html/website_in_server/showdata.php or PHP Warning: my...

keystone php3 app log and pastebins trying get rid of errors on php 4.3.9 on redhat linux httpd 2.0.52
if you can tell me why this php3 app is failing on php 4,3,9 (21:13:31) gavinhopeful: can someone take a peek at this code? http://hashphp.org/pastebin.php?format=plain&pid=8178 (21:13:42) gavinhopeful: this function is php3 and is buggering me on php 4.3.9 (21:13:47) gavinhopeful: 13G log (21:15:09) gavinhopeful: http://hashphp.org/pastebin.php?format=plain&pid=8179 (21:15:26) gavinhopeful: is log error (21:16:05) tdd19842: any one every built a shopping cart? I don't know how I'm gonna do this, but I am buildling a shopping cart for classified ads, and they can pay for 7 day...

Web resources about - How to get rid of warnings? - comp.lang.php

Storm Warning (2007 film) - Wikipedia, the free encyclopedia
Rob and Pia, a couple who are out for a day of sailing become lost in a heavy storm and end up on a desolate island. They come across a barn ...

WARNING: Malware Targets Brazil’s Facebook Users
Microsoft discovered malware aimed at obtaining Facebook users’ login information and taking over their accounts, and the new malware strain, ...

Warnings to check fine print on generous solar tariff offers from power companies - AdelaideNow Search ...
HOUSEHOLDERS have been warned to check the deals being offered by electricity companies in case they are being given generous solar tariffs but ...

Record temperatures for March a warning of what's to come, say experts
Record-breaking autumn heat is just a warning of what's to come if Australia doesn't act immediately to combat climate change.

Warning to check power companies’ solar tariff ‘deals’
HOUSEHOLDERS have been warned to check the deals being offered by electricity companies in case they are being given generous solar tariffs but ...

Arson fears prompt Catholic Church security warning ahead of Easter
The Catholic Church is bracing for possible arson attacks in the lead up to Easter, one year after a three churches linked to paedophile priests ...

Dangerous storm warning passes for Perth after lightning show
A dangerous storm warning for Perth has been cancelled - after an earlier lightning show and advice of severe thunderstorms.

Brussels attacks: Belgium accused of ignoring warnings about suicide bomber
... prosecutor confirms two brothers were responsible for attacks in Brussels, while the Turkish President says Belgian authorities ignored warnings ...

Winter Storm Warnings Posted For Lower Peninsula Counties Until Late Thursday
Winter Storm Warnings Posted For Lower Peninsula Counties Until Late Thursday 9&10 News Never mind, we got it! FBI claims it found a way into ...

Hyundai recalls Santa Fe Sport for seatbelt warning light
... Hyundai will recall 34,200 examples of the 2016 and 2017 Santa Fe Sport because of potential damage to the wiring for the seatbelt warning light. ...

Resources last updated: 3/23/2016 10:17:55 PM