提交 29045d88 编写于 作者: C Chris Lalancette

Fix build of openvz on RHEL-5.

When building libvirt on RHEL-5, I saw this error:

cc1: warnings being treated as errors
openvz/openvz_conf.c: In function 'openvzGetVPSUUID':
openvz/openvz_conf.c:835: warning: 'saveptr' may be used uninitialized in this function
make[3]: *** [libvirt_driver_openvz_la-openvz_conf.lo] Error 1

gcc in RHEL-5 gets upset about this usage of strtok_r (even though
it is perfectly valid).  Just set *saveptr to NULL at the
start to quiet it down.
Signed-off-by: NChris Lalancette <clalance@redhat.com>
上级 df032bab
......@@ -832,7 +832,7 @@ openvzGetVPSUUID(int vpsid, char *uuidstr, size_t len)
{
char conf_file[PATH_MAX];
char line[1024];
char *saveptr;
char *saveptr = NULL;
char *uuidbuf;
char *iden;
int fd, ret;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册