samba-technical@lists.samba.org
[Top] [All Lists]

Re: Checkin 7669bc3c898 creates warnings in Samba3

Subject: Re: Checkin 7669bc3c898 creates warnings in Samba3
From: Matthias Dieter Wallnöfer
Date: Fri, 25 Sep 2009 10:12:04 +0200
Hi Jeremy & Volker,

sorry - I'm so sorry. I took the opposite way to fix the warnings. Maybe I should have published my patch here first - so I would have prevented this trouble. Anyway - the next time I know about this problem and try to be more careful.

One point left: I would like to reapply the move of the two list pointers in "user_ok" (smb/passwords.c) into the blocks - just to be consistent.

Matthias

Jeremy Allison schrieb:
On Fri, Sep 25, 2009 at 12:00:10AM +0200, Matthias Dieter Wallnöfer wrote:
Hi Volker,

all should be alright now. I hope you are satisfied with my correction methods. Otherwise please comment!

I don't think these are correct.

str_list_make and str_list_make_v3 should *not* return const
strings. They're never used in that way in the code and in
the test harness they're expected to return char **,
not const char **. You're having to cast away const
in every usage. This is a sign you've got the API
wrong.

Look at what it's doing. It's taking a const char *
and splitting it into an allocated list so it can be
changed. It needs to return char **.

You can allways assign char ** to const char ** without
a cast, it's the other way round (the way you have now)
that causes the problem.

Jeremy.


<Prev in Thread] Current Thread [Next in Thread>