| To: | Keir Fraser <keir@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [Xen-devel] mini-os: C programming |
| From: | PUCCETTI Armand <armand.puccetti@xxxxxx> |
| Date: | 2007年3月15日 16:11:33 +0100 |
| Cc: | xen-devel@xxxxxxxxxxxxxxxxxxx |
| Delivery-date: | 2007年3月15日 08:10:03 -0700 |
| Envelope-to: | www-data@xxxxxxxxxxxxxxxxxx |
| In-reply-to: | <C21F007E.B8C1%keir@xxxxxxxxxxxxx> |
| List-help: | <mailto:xen-devel-request@lists.xensource.com?subject=help> |
| List-id: | Xen developer discussion <xen-devel.lists.xensource.com> |
| List-post: | <mailto:xen-devel@lists.xensource.com> |
| List-subscribe: | <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe> |
| List-unsubscribe: | <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> |
| References: | <C21F007E.B8C1%keir@xxxxxxxxxxxxx> |
| Sender: | xen-devel-bounces@xxxxxxxxxxxxxxxxxxx |
| User-agent: | Thunderbird 1.5.0.9 (X11/20070103) |
Keir Fraser a écrit :
On 15/3/07 13:39, "PUCCETTI Armand" <armand.puccetti@xxxxxx> wrote:extern char *stack;Yes, this one is bogus.2. In file xen-3.0.3/extras/mini-os/gnttab.c:140: the const variable gnttabop_error_msgs is declared as static const char *gnttabop_error_msgs[] = GNTTABOP_error_msgs; shouldn't that instead be declared: static const char * const gnttabop_error_msgs[] = GNTTABOP_error_msgs;It doesn't really matter, does it? Personally I hate scattering 'const' all over the place. -- Keir
It doesn't cause any crash probably, but according to the semantics that youwish gnttabop_error_msgs to have, all pointers of this array _should_ be constant
(I guess you're not going to change the error messages dynamically)and not only the strings refered by these pointers. The type of both declarations
is given by cdecl: $ cdecl char * const gnttabop_error_msgs[] ; declare gnttabop_error_msgs as array of const pointer to char; const char * gnttabop_error_msgs[]; declare gnttabop_error_msgs as array of pointer to const char; _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [Xen-devel] performance counters , Keir Fraser |
|---|---|
| Next by Date: | [Xen-devel] [PATCH] Remove tabs from xm/shutdown.py , Masaki Kanno |
| Previous by Thread: | Re: [Xen-devel] mini-os: C programming , Keir Fraser |
| Next by Thread: | RE: [Xen-devel] mini-os: C programming , Petersson, Mats |
| Indexes: | [Date] [Thread] [Top] [All Lists] |