Skip to content

Commit 24a7c9d

Browse files
committed
fix some warnings and some lint errors
1 parent ba6ef88 commit 24a7c9d

20 files changed

+26
-38
lines changed

examples/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ endfunction()
2828
function(def_example example)
2929
split(${example} target source)
3030
add_executable(${target} ${source})
31+
target_compile_options(${target} PUBLIC
32+
$<$<CXX_COMPILER_ID:GNU>:-Wno-maybe-uninitialized>) # warnings being emitted from stdlib headers, why?
3133
target_link_libraries(${target}
3234
PRIVATE STDEXEC::stdexec
3335
stdexec_executable_flags
3436
$<TARGET_NAME_IF_EXISTS:TBB::tbb>)
35-
target_compile_options(${target} INTERFACE
36-
$<$<CXX_COMPILER_ID:GNU>:-Wno-maybe-uninitialized>) # warnings being emitted from stdlib headers, why?
3737
endfunction()
3838

3939
set(stdexec_examples

include/exec/detail/system_context_replaceability_api.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
#include "../../stdexec/__detail/__execution_fwd.hpp"
2121
#include "../../stdexec/__detail/__system_context_replaceability_api.hpp"
2222

23-
#include <cstddef>
2423
#include <memory>
2524

2625
namespace experimental::execution::system_context_replaceability

include/exec/execute.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "../stdexec/__detail/__execution_fwd.hpp"
1919

2020
#include "../stdexec/__detail/__concepts.hpp"
21-
#include "../stdexec/__detail/__receivers.hpp"
2221
#include "../stdexec/__detail/__schedulers.hpp"
2322
#include "../stdexec/__detail/__senders.hpp"
2423
#include "../stdexec/__detail/__then.hpp"

include/exec/sequence_senders.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,10 +849,9 @@ namespace experimental::execution
849849
return STDEXEC::connect(static_cast<next_sender_of_t<_Receiver, __tfx_seq_t>&&>(__next),
850850
__stopped_means_break<_Receiver>{
851851
static_cast<_Receiver&&>(__rcvr)});
852-
// NOLINTNEXTLINE(bugprone-branch-clone)
853852
}
854853
else if constexpr (__subscribable_with_static_member<__tfx_seq_t, _Receiver>)
855-
{
854+
{ // NOLINT(bugprone-branch-clone)
856855
return __tfx_seq.subscribe(static_cast<__tfx_seq_t&&>(__tfx_seq),
857856
static_cast<_Receiver&&>(__rcvr));
858857
}

include/stdexec/__detail/__any.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1198,7 +1198,8 @@ namespace STDEXEC::__any
11981198
[[nodiscard]]
11991199
static constexpr auto __value_(_Self &&__self) noexcept -> auto &&
12001200
{
1201-
using __from_ref_t = __if_c<std::is_lvalue_reference_v<_Self>, _Value &, _Value &&>;
1201+
using __from_ref_t
1202+
[[maybe_unused]] = __if_c<std::is_lvalue_reference_v<_Self>, _Value &, _Value &&>;
12021203
using __to_ref_t = __copy_cvref_t<_Self &&, __value_type>;
12031204

12041205
STDEXEC_IF_NOT_CONSTEVAL

include/stdexec/__detail/__atomic_intrusive_queue.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
#include "__intrusive_queue.hpp"
2323

2424
#include <cassert>
25-
#include <cstddef>
2625

2726
namespace STDEXEC
2827
{

include/stdexec/__detail/__bulk.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,8 @@ namespace STDEXEC
176176
__with_error_invoke_t<_AlgoTag, _Fun, _Shape, _CvSender, _Env...>>;
177177

178178
template <class _AlgoTag>
179-
struct __generic_bulk_t
180-
{ // NOLINT(bugprone-crtp-constructor-accessibility)
179+
struct __generic_bulk_t // NOLINT(bugprone-crtp-constructor-accessibility)
180+
{
181181
template <sender _Sender,
182182
typename _Policy,
183183
__std::integral _Shape,

include/stdexec/__detail/__connect_awaitable.hpp

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@
2222
#include "__concepts.hpp"
2323
#include "__config.hpp"
2424
#include "__env.hpp"
25-
#include "__optional.hpp"
2625
#include "__receivers.hpp"
2726

2827
#include <exception>
29-
#include <utility>
3028

3129
STDEXEC_PRAGMA_PUSH()
3230
STDEXEC_PRAGMA_IGNORE_GNU("-Wsubobject-linkage")
@@ -199,22 +197,22 @@ namespace STDEXEC
199197

200198
union
201199
{
202-
[[no_unique_address]]
200+
STDEXEC_ATTRIBUTE(no_unique_address)
203201
__awaitable_t __awaitable_;
204202
};
205203

206204
union
207205
{
208-
[[no_unique_address]]
206+
STDEXEC_ATTRIBUTE(no_unique_address)
209207
__awaiter_t __awaiter_;
210208
};
211209
};
212210

213-
[[no_unique_address]]
211+
STDEXEC_ATTRIBUTE(no_unique_address)
214212
_Awaitable __source_awaitable_;
215213
union
216214
{
217-
[[no_unique_address]]
215+
STDEXEC_ATTRIBUTE(no_unique_address)
218216
__state __awaiter_;
219217
};
220218

@@ -277,16 +275,16 @@ namespace STDEXEC
277275

278276
union
279277
{
280-
[[no_unique_address]]
278+
STDEXEC_ATTRIBUTE(no_unique_address)
281279
__awaiter_t __awaiter_;
282280
};
283281
};
284282

285-
[[no_unique_address]]
283+
STDEXEC_ATTRIBUTE(no_unique_address)
286284
_Awaitable __source_awaitable_;
287285
union
288286
{
289-
[[no_unique_address]]
287+
STDEXEC_ATTRIBUTE(no_unique_address)
290288
__state __awaiter_;
291289
};
292290

@@ -348,16 +346,16 @@ namespace STDEXEC
348346

349347
union
350348
{
351-
[[no_unique_address]]
349+
STDEXEC_ATTRIBUTE(no_unique_address)
352350
__awaiter_t __awaiter_;
353351
};
354352
};
355353

356-
[[no_unique_address]]
354+
STDEXEC_ATTRIBUTE(no_unique_address)
357355
_Awaitable __source_awaitable_;
358356
union
359357
{
360-
[[no_unique_address]]
358+
STDEXEC_ATTRIBUTE(no_unique_address)
361359
__state __awaiter_;
362360
};
363361

@@ -389,7 +387,7 @@ namespace STDEXEC
389387
{
390388
// _Awaitable has neither a distinct awaiter, nor a distinct awaitable
391389
// so we don't need separate storage for either
392-
[[no_unique_address]]
390+
STDEXEC_ATTRIBUTE(no_unique_address)
393391
_Awaitable __awaiter_;
394392

395393
template <__not_decays_to<__awaitable_state> _Awaitable2>
@@ -534,11 +532,11 @@ namespace STDEXEC
534532
}
535533

536534
__synthetic_coro_frame __synthetic_frame_{&__promise_t::__resume};
537-
[[no_unique_address]]
535+
STDEXEC_ATTRIBUTE(no_unique_address)
538536
_Receiver __rcvr_;
539537
[[neo_unique_addres]]
540538
__awaitable_state<_Awaitable, __promise_t> __awaiter_;
541-
[[no_unique_address]]
539+
STDEXEC_ATTRIBUTE(no_unique_address)
542540
bool __started_{false};
543541
};
544542
} // namespace __connect_await

include/stdexec/__detail/__execution_legacy.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "__config.hpp"
1919

2020
#if !STDEXEC_NO_STDCPP_EXECUTION_POLICY()
21-
# include <execution>
21+
# include <execution> // IWYU pragma: keep
2222
#endif
2323

2424
namespace STDEXEC

include/stdexec/__detail/__inline_scheduler.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include "__execution_fwd.hpp"
1919

2020
#include "__completion_behavior.hpp"
21-
#include "__queries.hpp"
2221
#include "__receivers.hpp"
2322
#include "__schedulers.hpp"
2423

0 commit comments

Comments
 (0)