Ticket #247 (closed defect: invalid)

Opened 16 years ago

Last modified 15 years ago

mhl: realloc() -> malloc() when NULL passed

Reported by: metux Owned by: metux
Priority: major Milestone:
Component: mc-core Version: 4.6.2
Keywords: rework Cc:
Blocked By: Blocking:
Branch state: Votes for changeset:

Description (last modified by metux) (diff)

certain libc's (eg. on sunos) won't realloc(NULL, ...)

branch:247_fix_realloc
changeset:4de7b8763c91f53c91db1612689584494325f116

Change History

comment:1 Changed 16 years ago by metux

  • Status changed from new to accepted
  • Description modified (diff)

comment:2 Changed 16 years ago by metux

  • Keywords review added
  • Description modified (diff)

comment:3 Changed 16 years ago by slavazanko

  • Keywords rework added; review removed

Don't compile.

findme.o: In function `findProgramPath':
/srv/work/mc/git/src/findme.c:36: undefined reference to `mhl_mem_alloc_u'
mountlist.o: In function `read_filesystem_list':
/srv/work/mc/git/src/mountlist.c:306: undefined reference to `mhl_mem_alloc_u'
/srv/work/mc/git/src/mountlist.c:326: undefined reference to `mhl_mem_alloc_u'
popt.o: In function `poptAddAlias':
/srv/work/mc/git/src/popt.c:513: undefined reference to `mhl_mem_realloc'
/srv/work/mc/git/src/popt.c:518: undefined reference to `mhl_mem_alloc_u'
popt.o: In function `handleExec':
/srv/work/mc/git/src/popt.c:145: undefined reference to `mhl_mem_alloc_u'
/srv/work/mc/git/src/popt.c:140: undefined reference to `mhl_mem_realloc'
/srv/work/mc/git/src/popt.c:145: undefined reference to `mhl_mem_alloc_u'
popt.o: In function `poptGetNextOpt':
/srv/work/mc/git/src/popt.c:442: undefined reference to `mhl_mem_alloc_u'
/srv/work/mc/git/src/popt.c:437: undefined reference to `mhl_mem_realloc'
popt.o: In function `poptGetContext':
/srv/work/mc/git/src/popt.c:64: undefined reference to `mhl_mem_alloc_u'
/srv/work/mc/git/src/popt.c:75: undefined reference to `mhl_mem_alloc_u'
/srv/work/mc/git/src/popt.c:77: undefined reference to `mhl_mem_alloc_u'
/srv/work/mc/git/src/popt.c:86: undefined reference to `mhl_mem_alloc_u'
poptconfig.o: In function `configLine':
/srv/work/mc/git/src/poptconfig.c:55: undefined reference to `mhl_mem_realloc'

I'll rework this.

comment:4 Changed 16 years ago by slavazanko

In additional to previous comment:

$ gcc --version
gcc (GCC) 4.1.2 20070925 (Red Hat 4.1.2-33)

$ lsb_release -d
Description:    Fedora release 8 (Werewolf)
[slavaz@slavaz src]$ lsb_release -a
LSB Version:    :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: Fedora
Description:    Fedora release 8 (Werewolf)
Release:        8
Codename:       Werewolf

comment:5 Changed 16 years ago by slavazanko

  • Keywords review vote-slavazanko added; rework removed

Errors fixed. Please review.

comment:6 Changed 16 years ago by winnie

  • Keywords rework added; review vote-slavazanko removed

Fix is okay.. but commit msg isn't. I've rewrote this and have done a forced push. Please update your working copyies..

Furthermore:
In file included from ../../mhl/string.h:7,

from ../../edit/usermap.c:33:

../../mhl/memory.h: In function ‘mhl_mem_realloc’:
../../mhl/memory.h:27: warning: type of ‘ptr’ defaults to ‘int’
../../mhl/memory.h:27: warning: type of ‘sz’ defaults to ‘int’
../../mhl/memory.h:28: warning: implicit declaration of function ‘mhl_mem_alloc’
../../mhl/memory.h:28: warning: return makes pointer from integer without a cast
../../mhl/memory.h:29: warning: passing argument 1 of ‘realloc’ makes pointer from integer without a cast

Sorry no vote from me.

Btw: slavaz where are your fixes.. the last commit in the 247_ branch is from Enrico from 4. Feb...?

comment:7 Changed 16 years ago by slavazanko

Ups.. sorry, I mistaken, my last three comments must be plased in #243...

comment:8 Changed 16 years ago by styx

  • Status changed from accepted to testing
  • Resolution set to invalid

Should be closed: no mhl for now

comment:9 Changed 16 years ago by winnie

  • Status changed from testing to closed

comment:10 Changed 15 years ago by anonymous

  • Milestone 4.6.3 deleted

Milestone 4.6.3 deleted

Note: See TracTickets for help on using tickets.