Skip to content

assert fix + tweaks - #364

Merged
Smattr merged 4 commits into
mainfrom
smattr/1d9e52fd-fb03-4baf-8add-316f03b8c666
Oct 16, 2026
Merged

Smattr merged 4 commits into
mainfrom
smattr/1d9e52fd-fb03-4baf-8add-316f03b8c666

Conversation

@Smattr

@Smattr Smattr commented Oct 16, 2026

Copy link
Copy Markdown
Owner

No description provided.

FreeBSD 13 was EOLed long ago and its images have now stopped
functioning:

  + pkg install -y bison cmake git gmp python3 devel/py-pytest
    Updating FreeBSD repository catalogue...
    pkg: Failed to fetch http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest/meta.conf: Failed writing received data to disk/application
    repository FreeBSD has no meta file, using default settings
    pkg: Failed to fetch http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest/meta.txz: Failed writing received data to disk/application
    pkg: Failed to fetch http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest/data.pkg: Failed writing received data to disk/application
    pkg: Failed to fetch http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest/data.tzst: Failed writing received data to disk/application
    pkg: Failed to fetch http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest/packagesite.pkg: Failed writing received data to disk/application
    Unable to update repository FreeBSD
    Error updating repositories!
    pkg: Failed to fetch http://pkg.FreeBSD.org/FreeBSD:13:amd64/latest/packagesite.tzst: Failed writing received data to disk/application
This was discovered while trying to 100% Clang’s -Wstring-conversion. I
am unsure if this is an argument _for_ compiler warnings or a cautionary
tale about the perils of a lack of negative testing.
Clang complains about this idiom. Interestingly (?) apparently I was
aware of this some time ago¹ but did not realise the implications in
this context.

¹ See compiler.h in d6fc4fd.
I am not sure why these were not `ASSERT`¹ to begin with. They certainly
look like they could advantage performance.

¹ A macro that expands to `assert` plus some performance hints to the
  compiler.
@Smattr
Smattr force-pushed the smattr/1d9e52fd-fb03-4baf-8add-316f03b8c666 branch from 2881044 to 5f7e5f8 Compare October 16, 2026 00:53
@Smattr
Smattr merged commit 1074a07 into main Oct 16, 2026
25 checks passed
@Smattr
Smattr deleted the smattr/1d9e52fd-fb03-4baf-8add-316f03b8c666 branch October 16, 2026 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant