use std::format* instead of snprintf in xwayland_spawner.cpp#4793
Open
yotam-medini wants to merge 2 commits intocanonical:mainfrom
Open
use std::format* instead of snprintf in xwayland_spawner.cpp#4793yotam-medini wants to merge 2 commits intocanonical:mainfrom
yotam-medini wants to merge 2 commits intocanonical:mainfrom
Conversation
5df7145 to
f31b5f2
Compare
robert-ancell
requested changes
Mar 23, 2026
7e6771d to
a413c84
Compare
robert-ancell
approved these changes
Mar 31, 2026
Contributor
robert-ancell
left a comment
There was a problem hiding this comment.
Thanks for the improvement!
Contributor
|
@Saviq the CI seems to be stalled - any ideas why? |
Contributor
That'd be 136cefd7193aade370d7410a52f8e5aa76eb51ca… But why is TiCS fine being skipped, and the others, not? |
Saviq
reviewed
Mar 31, 2026
| create_socket(result, &addr, path_size); | ||
| auto name_create_socket = [&](char *bos, size_t limit) | ||
| { | ||
| auto eos = std::format_to_n(bos, limit, "{}", x11_socket).out; |
Contributor
There was a problem hiding this comment.
TiCS has this to say:
narrowing conversion from 'size_t' (aka 'unsigned long') to signed type 'iter_difference_t<char *>' (aka 'long') is implementation-defined.
Contributor
Author
There was a problem hiding this comment.
[How] can I run this TiCS locally ?
Contributor
There was a problem hiding this comment.
Sorry, you can't, but that actually comes from clang-tidy. You should be able to reproduce this with the following CMake options:
-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_CXX_CLANG_TIDY=clang-tidy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
May close #4660
Related: #4736
What's new?
use std::format or std::format_to_n instead of snprintf in xwayland_spawner.cpp
Save generated paths as XWaylandSpawner data members.
Introduce private XWaylandSpawner::XDisplayPaths struct.
Delegate public XWaylandSpawner ctor to private ctor via XDisplayPaths.
create_lockfile(), choose_display() are now static class methods.
How to test
Checklist