Skip to content

Commit c8884fa

Browse files
authored
Merge pull request #24 from fmichonneau/fix-gcc16-stringop-overflow
Avoid GCC 16 -Wstringop-overflow false positive in NxsString
2 parents ab96c87 + 437f52e commit c8884fa

2 files changed

Lines changed: 10 additions & 9 deletions

File tree

.github/workflows/rhub.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,24 @@
77
# It is unlikely that you need to modify this file manually.
88

99
name: R-hub
10-
run-name: "${{ github.event.inputs.id }}: ${{ github.event.inputs.name || format('Manually run by {0}', github.triggering_actor) }}"
10+
run-name: >-
11+
${{ github.event.inputs.id || format('Manual run by @{0}', github.triggering_actor) }}:
12+
${{ github.event.inputs.name || github.event.inputs.config }}
1113
1214
on:
1315
workflow_dispatch:
1416
inputs:
1517
config:
16-
description: 'A comma separated list of R-hub platforms to use.'
18+
description: >-
19+
Comma-separated list of R-hub platforms to use.
20+
Full list: https://r-hub.github.io/containers/
1721
type: string
1822
default: 'linux,windows,macos'
1923
name:
20-
description: 'Run name. You can leave this empty now.'
24+
description: 'Run name. You can leave this empty.'
2125
type: string
2226
id:
23-
description: 'Unique ID. You can leave this empty now.'
27+
description: 'Unique ID. You can leave this empty.'
2428
type: string
2529

2630
jobs:

src/ncl/nxsstring.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ inline NxsString &NxsString::operator=(
422422
inline NxsString &NxsString::operator+=(
423423
const char *s) /* the C-string to be appended */
424424
{
425-
append(std::string(s));
425+
append(s);
426426
return *this;
427427
}
428428

@@ -442,10 +442,7 @@ inline NxsString &NxsString::operator+=(
442442
inline NxsString &NxsString::operator+=(
443443
const char c) /* the character to append */
444444
{
445-
char s[2];
446-
s[0] = c;
447-
s[1] = '\0';
448-
append(std::string(s));
445+
push_back(c);
449446
return *this;
450447
}
451448

0 commit comments

Comments
 (0)