"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Florian Obser <florian@narrans.de>
Subject:
two more dead stores in tog/tog.c
To:
gameoftrees <gameoftrees@openbsd.org>
Date:
Thu, 21 Jul 2022 19:09:23 +0200

Download raw body.

Thread
scan-build reports two more dead stores in tog/tog.c where I don't know
what to do about.

No idea what this does, should there be only one call to
offset_selection_down()? or are there simply two
	if (err)
		return err;
missing?

  1206		if (v->mode == TOG_VIEW_SPLIT_HRZN) {
  1207			err = offset_selection_down(v);
  1208			err = offset_selection_down(v->child);
  1209		} else {



Here I'd just ignore close_err because there is nothing we can do about
it. But we have all the information that we need, so we might as well
just chug along.

It's mainly bubbling up errors from close(2) which tbh should have a
return type of void.

But maybe that's not the style all y'all prefer, then I guess it should
do a goto done;

  8272		close_err = got_repo_close(repo);
  8273		if (error == NULL)
  8274			error = close_err;
  8275		repo = NULL;
  8276
  8277		error = got_object_id_str(&commit_id_str, commit_id);
  8278		if (error)
  8279			goto done;


-- 
I'm not entirely sure you are real.