Programming :: Vfprintf In 64-bit Environment - Warning: Passing Argument 3 Of Vfprintf From Incompatible Pointer Type
Apr 14, 2010
I want to use vfprintf with the char * on 64-bit. Here is the sample code:
[Code]...
In this code, I am getting warning: passing argument 3 of vfprintf from incompatible pointer type I have done sizeof(va_list) on 64-bit, and its 24 bytes. I don't know how am I suppose to use the va_list this way.
i have a minimal ubuntu desktop and i'm trying to install the latest nvidia driver (downloaded from their website) and i got the following error:
Quote:
/tmp/selfgz2431/NVIDIA-Linux-x86_64-256.53/kernel/nv.c: At top level: /tmp/selfgz2431/NVIDIA-Linux-x86_64-256.53/kernel/nv.c:426:5: error: unknown field �ioctl� specified in initializer /tmp/selfgz2431/NVIDIA-Linux-x86_64-256.53/kernel/nv.c:426:5: warning: initialization from incompatible pointer type
[code]....
i had to apt-get even gcc and make, so i'm probably missing some required package...
I am trying to simulate a shell. So what I do is checking of having the parameters from standard input, suc as "/bin/ls -l /home/france/Documents", and then passing them to function execute, which at some point calls execvp(argv[0],argv)The problem is that I don't succeed in using these arguments, while if I call execvp(paramList[0],paramList) it works!!!! Where paramList is exactly what I would put on standard input, but defined statically.
Say, i have an imaginary std library function, which I want to call.
Code: void std_lib_func(ObjectType *param);
Now in my c++ program, I have a main() function, and I will like to call a customized function (which will in turn call the std lib function) from the main function, as below:
Code: int main() { ObjectType *aobj; customized_func(aobj); } [Code]...
I tried the below but get an error that the std lib function is expecting a ObjectType* param, not aobj. How should I work this out.
I am playing around with a new chat program and I have errors that I can not figure out. Here is what I am getting.
parse.c:1638: error: dereferencing pointer to incomplete type parse.c:1638: error: dereferencing pointer to incomplete type parse.c:1638: error: dereferencing pointer to incomplete type
here is the code:
if (scan->jail_timeout == 0 && scan->location == prison) { command_type |= HIGHLIGHT; tell_player(scan, " After serving your sentence you are flung out"
I have a number of projects, say test1, test2, test3,. I want to make and install all of them in exactly the same way; so I would like to say make test2 make install test2 with the same Makefile.
In other words, I would like to pass the argument test2 (or just 2) to the Makefile, so this is taken as the target for make or make install. This must be a common wish; but I don't see any appropriate option with "man make" on my Fedora-12 system.
Is this a cause for conflicts between gcc 3 and gcc 4. If so how do i rectify the same? I have compat-ltdc++ installed. Similar errors are sure to follow during the compilation process.
I am trying to duplicate our company website running from Centos 5.5 to another Fedora 13 box. The output is ok but when I tried to open 1 page which automatically search pdf files, this errors appear:
Warning: fopen(help_search/file - file.txt) [function.fopen]: failed to open stream: No such file or directory in/var/www/html/site/index.php on line 1018
Warning: Invalid argument supplied for foreach() in /var/www/html/site/index.php on line 1023
Warning: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings.You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Manila' for 'PHT/8.0/no DST' instead in/var/www/html/site/index.php on line 1297
Warning: date()[function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Asia/Manila' for 'PHT/8.0/no DST' instead in /var/www/html/site/index.php on
I was just confused because in Centos 5.5 it works fine.
When i type 'ifconfig eth0 192.168.25.1 255.255.255.0' the outcome is 'SIOCSIFADDR : invalid argument', but when i check the ip address using /sbin/ifconfig i see the ip address is updated to 192.168.25.1 and is up. When i restart the linux box,the /sbin/ifconfig is reset to 192.168.100.1 .what should i do so that the linux box /sbin/ifconfig should not change when am rebooting.
I have been googling trying to fix this ... basicly I have a (int **) variable, and when I try to pass a (int) value to a specific position, I have seg.fault.Resuming what I have is:
I'm having trouble getting subversion working on Centos 4.7. When I try to create a repository using:
Code: svnadmin create /path/to/repo I get: Code:
svn: Berkeley DB error while creating environment for filesystem repo/db: Invalid argument svn: bdb: Berkeley DB library configured to support only DB_PRIVATE environments
I've searched the Net, with little luck. Threads seem to suggest that Centos has this flag compiled into the Berkeley DB RPM by default; whereas SVN doesn't want it. Someone, somewhere, must have got this to work and I'm sure it's something really simple I'm doing wrong.
I used xbindkeys and xvkbd to map my extra mouse buttons to page up and page down. With kde 4.4 it worked, but since I upgraded to kde 4.5 beta, I get the following error when xbindkeys starts:
Code:
*** Warning ***verify that there is not another program running which captures one of the keys captured by xbindkeys. It seems that there is a conflict, and xbindkeys can't grab all the keys defined in its configuration file. And for button press I get
Code:
Warning: Cannot convert string "-*-lucidatypewriter-bold-r-*-*-12-*-*-*-*-*-iso8859-1" to type FontStruct Warning: Cannot convert string "-*-helvetica-bold-r-*-*-12-*-*-*-*-*-iso8859-1" to type FontStruct
I'm trying to write a base script which will divide an argument by 10 and then use that argument in another program. Since my argument can be a floating point number, I used bc to accomplish this. Here's an example of a simplified version of what I have so far:
<code>NUM=$(echo "scale=25;$1/10" | bc) #make sure the first argument was formatted correctly if [ $? -ne 0 ]
I'm struggling with the issue of passing a vector of a class to itself, here's what state its in now... (tried many variations, but without direction).
I'm trying to work out the best way to achieve the following.
1)php page that grabs data from a local database. (not a problem)
2)It then needs to send this data to a c program/service running on a remote server. (I probably need it to be able to handle 4+ million reocrds in an array)
3) The c service then needs to process the data and send it back to the initial php script that called it. i was hoping this could be in a an array like structure of some kind. 4)update the db with the results.
I was thinking of using gsoap to write a simple c soap service that php can communicate with. Would this be the right way of doing this or would something like sockets in php be a better way of sending this volume of data as an array or struct to linux c socket if thats even possible.
i'm programming a small tcp client, but i need that the server knows the source ip. My client receives a external connection and forwards, but the ip seen by the server, of course, is the client ip. I would like, change this ip to original source ip.
I don't know how to do this. I tried with the connect and select function.
I have a file with around 1000 IP addresses in it and I need to be able to ssh into each one of them, run a single command, and then exit. I already know the ssh command I want to run and it looks like this:
(I know shpass is not good to use and keys are the correct way but I don't have any other options in this scenario.) if these ip addresses were in a .csv file, by themselves with no other information, how would I create a script to do the above command to each ip until the end of the file?
and lang.php has a link to page2.html, how do I pass on the value of the lang parameter from lang.php to page2.html? The value needed is the one passed in to lang.php.
An input filename ($1) is fed into mediainfo, which by the use of grep and cut spits out a single number which is the aspect ratio. This is then divided by bc into 320, which gives the desired height dimension for the file that I want ffmpeg to create for me. Finally, ffmpeg runs using the calculated dimensions... Basically, it's the passing of the $ASPECT variable to bc that seems to fail. It looks like bc won't read the output from the mediainfo line... It always crashes out with:
Code:
(standard_in) 1: illegal character: ^M I've tried doing something even simpler like this to debug by just trying it to display the calculation on the screen: