Fix gcc uninitialization warning confusion
This commit is contained in:
parent
423e3b15d2
commit
c7e8b256d2
@ -173,9 +173,8 @@ static int
|
|||||||
report_libovni_version(struct system *sys)
|
report_libovni_version(struct system *sys)
|
||||||
{
|
{
|
||||||
int mixed = 0;
|
int mixed = 0;
|
||||||
int first = 1;
|
const char *version = NULL;
|
||||||
const char *version;
|
const char *commit = NULL;
|
||||||
const char *commit;
|
|
||||||
for (struct thread *th = sys->threads; th; th = th->gnext) {
|
for (struct thread *th = sys->threads; th; th = th->gnext) {
|
||||||
if (th->meta == NULL) {
|
if (th->meta == NULL) {
|
||||||
err("thread has no metadata %s", th->id);
|
err("thread has no metadata %s", th->id);
|
||||||
@ -196,11 +195,11 @@ report_libovni_version(struct system *sys)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (first) {
|
if (version == NULL)
|
||||||
version = t_version;
|
version = t_version;
|
||||||
|
|
||||||
|
if (commit == NULL)
|
||||||
commit = t_commit;
|
commit = t_commit;
|
||||||
first = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (strcmp(t_version, version) != 0) {
|
if (strcmp(t_version, version) != 0) {
|
||||||
warn("thread is using a different libovni version (%s): %s",
|
warn("thread is using a different libovni version (%s): %s",
|
||||||
|
Loading…
Reference in New Issue
Block a user