🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #12288

Re: warning de 'C'

#12288
From: Gonzalo Paniagua Javier
Date: Mon, 06 Aug 2001 23:43
21 lines
1715 bytes
Eduard Garcia <eduardo.garcia2@upcnet.es> escribi�:
>        warning: 'variable1' might be used uninitialized in this
> function

> referido a una variable local de una funci�n, que, al igual que con el
> resto de variables est� declarada primero y luego se le dan valores, edl
> palo:

>        FILE *ftmp;
>        [...]

>        ftmp = fopen(...
>        [...]

>        fclose(ftmp);
>        [...]}

> Qu� problema es y c�mo lo puedo solventar? No es que de ning�n problema,
> m�s que nada por que queda mejor que, al compilar, no haya quejas.

	�El fopen() est� dentro de un if y el fclose() fuera?
Technical Details
Message-ID: <m4ank9.2b.ln@127.0.0.1>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!dc1.nntp.concentric.net!195.206.66.162.MISMATCH!newsfeed.concentric.net!Amsterdam.Infonet!News.Amsterdam.UnisourceCS!news.telia-iberia.com!newsf01.!newsr02..POSTED!not-for-mail
References: <3B6E0B4B.526E5A21@upcnet.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,fd2295852d4cdc25
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-08-06 16:42:46 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!howland.erols.net!dc1.nntp.concentric.net!195.206.66.162.MISMATCH!newsfeed.concentric.net!Amsterdam.Infonet!News.Amsterdam.UnisourceCS!news.telia-iberia.com!newsf01.!newsr02..POSTED!not-for-mail
From: Gonzalo Paniagua Javier <gpanjav@jazzfree.com>
Subject: Re: warning de 'C'
Newsgroups: es.comp.os.linux.programacion
References: <3B6E0B4B.526E5A21@upcnet.es>
User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (Linux/2.4.7-ac3 (i586))
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Message-ID: <m4ank9.2b.ln@127.0.0.1>
Lines: 22
Date: Mon, 06 Aug 2001 23:43:07 GMT
NNTP-Posting-Host: 62.42.14.67
X-Trace: newsr02. 997141387 62.42.14.67 (Tue, 07 Aug 2001 01:43:07 MET DST)
NNTP-Posting-Date: Tue, 07 Aug 2001 01:43:07 MET DST