Re: the latest version of Clang/LLVM for the world and kernel

看板FB_current作者時間12年前 (2013/04/27 13:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/7 (看更多)
Dimitry Andric wrote this message on Fri, Feb 15, 2013 at 16:57 +0100: > >/usr/src/usr.sbin/wpa/wpa_passphrase/../../../contrib/wpa//src/crypto/md5-internal.c:191:30: note: did you mean to dereference the argument to 'sizeof' (and multiply it by the number of elements)? > >* os_memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ > >* ^~~ > >There just has to be an organization behind these backdoors... > > No, this is just a very common error. The idiom is either: > > memset(&object, 0, sizeof object); > > or > > memset(&pointer, 0, sizeof *pointer); > > but apparently it is difficult to choose the right one. :) I assume you mean: memset(pointer, 0, sizeof *pointer); :) -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." _______________________________________________ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
文章代碼(AID): #1HUsBPQI (FB_current)
討論串 (同標題文章)
文章代碼(AID): #1HUsBPQI (FB_current)