[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Build warning.

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2002-11-15 00:36:41 CET

cmpilato@collab.net writes:
> Been seeing these lately, dunno why:
>
> /home/cmpilato/projects/subversion/subversion/include/svn_types.h:120:
> Warning(451): Setting const char * member may leak memory.

Hmmm. GCC gurus, is there some warning option that causes gcc to warn
about the possibility that one may forget to free a non-fixed-size
field in a structure? That's the main difference between that field
and everything else in the structure, as far as I can tell:

  /* A general subversion directory entry. */
  typedef struct svn_dirent
  {
    svn_node_kind_t kind; /* node kind */
    apr_off_t size; /* length of file text, or 0 for directories */
    svn_boolean_t has_props; /* does the node have props? */
  
    svn_revnum_t created_rev; /* last rev in which this node changed */
    apr_time_t time; /* time of created_rev (mod-time) */
    const char *last_author; /* author of created_rev */
  
  } svn_dirent_t;

(Line 120 is the `last_author' field.)

-K

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 15 01:10:55 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.