Skip to content

Commit b86730a

Browse files
committed
util: Remove designator initializer from ScheduleBatchPriority
Although no compiler appears to complain about it, these are not valid for c++11. (http://en.cppreference.com/w/cpp/language/aggregate_initialization says they're c++20) The structure is defined as: struct sched_param { int sched_priority; }; So passing 0 for the first field has the same effect.
1 parent cff66e6 commit b86730a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/util.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1064,7 +1064,7 @@ fs::path AbsPathForConfigVal(const fs::path& path, bool net_specific)
10641064
int ScheduleBatchPriority(void)
10651065
{
10661066
#ifdef SCHED_BATCH
1067-
const static sched_param param{.sched_priority = 0};
1067+
const static sched_param param{0};
10681068
if (int ret = pthread_setschedparam(pthread_self(), SCHED_BATCH, &param)) {
10691069
LogPrintf("Failed to pthread_setschedparam: %s\n", strerror(errno));
10701070
return ret;

0 commit comments

Comments
 (0)