From: Yakov Bezrukov <subst@gorodok.net>
To: community@altlinux.ru
Subject: Re: [Comm] warnings
Date: Mon, 28 Jun 2004 16:27:59 +0700
Message-ID: <200406281627.59239.subst@gorodok.net> (raw)
In-Reply-To: <44656324.20040628161020@ngs.ru>
On Monday 28 June 2004 16:10, php-coder wrote:
> In file included from main.c:20:
> functions.inc.h: In function `get_tracks_names':
> functions.inc.h:100: warning: implicit declaration of function
> `getline' functions.inc.h:109: warning: assignment makes integer from
> pointer without a cast functions.inc.h:118: warning: assignment makes
> integer from pointer without a cast main.c: In function `main':
> main.c:39: warning: pointer targets in passing arg 1 of `strlen'
> differ in signedness
>
> Весь вечер возился, но в чем причина и как устранить это так и не
> понял.
>
> В файле functions.inc.h:
>
> void get_tracks_names(int tracks, unsigned char
> *tracks_names_array) {
> char *buff_pointer = NULL;
> ...
> 100 getline(&buff_pointer, &buff_length, stdin);
подключи заголовок stdio.h, там находится объявление это функции.
> ...
> 109 tracks_names_array[i] = buff_pointer;
Вполне логично ругается :) ты присваиваешь элементу массива символов
указатель на символ.
> ...
> 118 tracks_names_array[i] = NULL;
Аналогично.
> }
>
> В файле main.c:
> 39 printf("Вы ввели: %s\nДлина строки: %d\n",
> tracks_names_array[i], strlen(tracks_names_array[i]));
>
> Буду благодарен за любую помощь...
next prev parent reply other threads:[~2004-06-28 9:27 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-28 9:10 php-coder
2004-06-28 9:27 ` Yakov Bezrukov [this message]
2004-06-28 9:36 ` Re[2]: " php-coder
2004-06-28 9:45 ` Yakov Bezrukov
2004-06-28 10:25 ` Re[2]: " php-coder
2004-06-28 11:05 ` Yakov Bezrukov
2004-06-29 4:00 ` Re[2]: " php-coder
2004-06-28 9:30 ` php-coder
2004-06-28 10:51 ` Andrey Rahmatullin
2004-06-29 3:50 ` Re[2]: " php-coder
2004-06-28 9:40 ` Andrey Rahmatullin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200406281627.59239.subst@gorodok.net \
--to=subst@gorodok.net \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git