LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 02-22-2007, 12:09 AM   #1
hottdogg
Member
 
Registered: Aug 2004
Location: aisenodni
Distribution: slackware 64bit ,debian 64bit
Posts: 202

Rep: Reputation: 30
How to suppress particular warning message?


How to suppress warning something like this:
Code:
warning: passing `float' for argument 4 of `virtual void
   QPushButton::setGeometry(int, int, int, int)'
in g++ 3.2.3 ?

tnx.
 
Old 02-22-2007, 02:01 AM   #2
MegaFighterX
LQ Newbie
 
Registered: Feb 2007
Posts: 11

Rep: Reputation: Disabled
Do you need it to be a float there? if that's the case, change the last bit to QPushButton::setGeometry(int, int, int, float).

Otherwise, if you just need the value there (minus the decimal places), just cast it (usually (type)(varname)).

What exactally do you need for that last variable?
 
Old 03-01-2007, 01:21 AM   #3
hottdogg
Member
 
Registered: Aug 2004
Location: aisenodni
Distribution: slackware 64bit ,debian 64bit
Posts: 202

Original Poster
Rep: Reputation: 30
I'm working on someone else's code with lots of warning.The one that I asked has been fixed.
But there are some inevitable warnings and I want to supress these.
such as:
Code:
assignment to `int' from `double'
argument to `int' from `double'
 
Old 03-02-2007, 01:15 AM   #4
MegaFighterX
LQ Newbie
 
Registered: Feb 2007
Posts: 11

Rep: Reputation: Disabled
I can understand why... But casting it should eliminate the warning...

I don't see why it's throwing a warning when going from a smaller number set to a larger one though... that's odd.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
user warning message windycity_linux Linux - Newbie 1 01-09-2007 01:07 AM
Partition warning message? kushalkoolwal Programming 4 10-19-2005 03:38 PM
why warning message is appear? eye Red Hat 3 10-22-2003 09:14 AM
suppress warning messages h/w Programming 2 10-07-2003 02:56 PM
Warning Message at startup onlyhuman9 Linux - General 1 11-29-2001 10:00 PM


All times are GMT -5. The time now is 08:16 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration