08-29-2003
gcc warnings: implicit declaration of function...
I am having strange warnings from gcc compiler, which I don't think should come while cmpiling.
Can anyone help? The warnings are:
- warning: implicit declaration of function 'bzero'
- warning: implicit declaration of function 'inet_addr'
The code is as below:
int main(int argc, char **argv)
{
struct sockaddr_in servaddr;
char buffer[BUFLEN];
int n;
argv0 = argv[0];
if ( (sockfd=Socket(AF_INET,SOCK_STREAM,0)) < 0 )
exit(1);
bzero(&servaddr,sizeof(servaddr));
servaddr.sin_family = AF_INET;
if ( (servaddr.sin_addr.s_addr = inet_addr("131.170.24.42"))
== -1 ) {
fprintf(stderr,"%s : inet_addr failed, errno=%d\n",argv0,errno);
exit(1);
}
.......
.......
}
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
I want some help in writing a script that will:
1. Implicitly ping a server to see if it is up or not. (I have blocked all ICMP traffic on that box)
2. if the server is down send an alert mail to users
I have looked and looked but I could not get any way to do this. What I have... (2 Replies)
Discussion started by: skotapal
2 Replies
2. AIX
only wanted to know .. if I have some tivoli jobs running with different user .. will this mean that everytime the job invokes .. the .profile runs for that user ... or is it that the .profile runs only at explicit LOGINs ...
e.g if a cron calls a job under some user, does it run the .profile of... (1 Reply)
Discussion started by: rajesh_149
1 Replies
3. Shell Programming and Scripting
Hi,
I want to FTP can some one help me how do I do this manually from unix command line
Thanks, (2 Replies)
Discussion started by: sridatos
2 Replies
4. Solaris
AIM- Install Oracle 11g on Solaris using VMWare
Steps
1.Logged on as root
2.Created subfolders à /usr/local/bin & /usr/local/bin/gcc
3.Downloaded gcc & libiconv & unzipped them on my harddrive & burnt them on CD
4.Copied files from CD to /usr/local/bin/gcc
5.Terminal (root) à pkgadd -d... (8 Replies)
Discussion started by: Ackers
8 Replies
5. Programming
Hi,
I'm tying to use the following function to reboot the system as part of my code
#include <unistd.h>
#include <linux/reboot.h>
int restart(unsigned int delay)
{
sleep(delay);
return reboot(LINUX_REBOOT_CMD_RESTART);
}
When I try to compile the code I get the warning in the... (2 Replies)
Discussion started by: galapogos
2 Replies
6. UNIX for Dummies Questions & Answers
Hello,
I have a problem with the declaration of a function.
This is how I declare the function :
c:63: void foo(threadpool *tp,void (*func)(void*), (void*)arg);
Inside main, I call it like this:
main(){
..........
threadpool y;
c:104: ... (4 Replies)
Discussion started by: garag11
4 Replies
7. SuSE
Hi,
I'm having issues with implicit dependencies for my RPM package. This is the error I'm getting:
error: Failed dependencies:
libclntsh.so.11.1()(64bit) is needed by geomatica-10.4-0.x86_64
Our software has a dynamically loaded library which links to the Oracle's libclntsh.so.11.1... (2 Replies)
Discussion started by: pneveu
2 Replies
8. Shell Programming and Scripting
Hi All,
I have the script as below
#!bin/bash
let k=9
if
then
echo "Start"
Hello
echo "End"
else
echo "failed"
fi
function Hello() {
echo "hello !!!!"
}
I got the below error : (4 Replies)
Discussion started by: Balasankar
4 Replies
9. UNIX for Advanced & Expert Users
Here are the essentials:
un: myuser
pw: mypasswd
site: sftp.somesite.com
port: 990
type: FTPS
enc: FTP over implicit TLS
program used:
Curl 7.1.x on Hpux 11.31
I would like to "put" 1 file on there server.
Here is my syntax, what am I doing wrong?
curl -3 -v --cacert... (4 Replies)
Discussion started by: olyanderson
4 Replies
10. Programming
Hi,
I am working in UEFI EDK2 Bios source. We created a platform related new package in the EDK2 source. I find a strange issue with the platform related code we added.
When I did source level debugging I noticed the
local variable in a C function is not getting created in stack when its... (6 Replies)
Discussion started by: Divya R
6 Replies
LEARN ABOUT DEBIAN
perl::critic::policy::testinganddebugging::prohibitnowarnings
Perl::Critic::Policy::TestingAndDebugging::ProhibitNoWarUsersContributed Perl DoPerl::Critic::Policy::TestingAndDebugging::ProhibitNoWarnings(3pm)
NAME
Perl::Critic::Policy::TestingAndDebugging::ProhibitNoWarnings - Prohibit various flavors of "no warnings".
AFFILIATION
This Policy is part of the core Perl::Critic distribution.
DESCRIPTION
There are good reasons for disabling certain kinds of warnings. But if you were wise enough to "use warnings" in the first place, then it
doesn't make sense to disable them completely. By default, any "no warnings" statement will violate this policy. However, you can
configure this Policy to allow certain types of warnings to be disabled (See "CONFIGURATION"). A bare "no warnings" statement will always
raise a violation.
CONFIGURATION
The permitted warning types can be configured via the "allow" option. The value is a list of whitespace-delimited warning types that you
want to be able to disable. See perllexwarn for a list of possible warning types. An example of this customization:
[TestingAndDebugging::ProhibitNoWarnings]
allow = uninitialized once
If a true value is specified for the "allow_with_category_restriction" option, then any "no warnings" that restricts the set of warnings
that are turned off will pass.
[TestingAndDebugging::ProhibitNoWarnings]
allow_with_category_restriction = 1
SEE ALSO
Perl::Critic::Policy::TestingAndDebugging::RequireUseWarnings
AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com>
COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license
can be found in the LICENSE file included with this module
perl v5.14.2 2012-06-07 Perl::Critic::Policy::TestingAndDebugging::ProhibitNoWarnings(3pm)