summary refs log tree commit diff
path: root/.gitignore
diff options
context:
space:
mode:
authorAntonio Ospite <ao2@ao2.it>2018-12-15 18:49:31 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2019-02-25 12:52:11 +0800
commit604bd2b57a08817da8d757c5eb265dbe11ef3d39 (patch)
tree09a5802503af4702f8557d786657c705a69df90f /.gitignore
parenteval: Only restore exit status on exit/return (diff)
downloaddash-604bd2b57a08817da8d757c5eb265dbe11ef3d39.tar.gz
dash-604bd2b57a08817da8d757c5eb265dbe11ef3d39.zip
shell: Fix clang warnings about "string plus integer"
Building with clang results in some warnings about integer values being
added to strings:

-----------------------------------------------------------------------
eval.c:1138:13: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
                p = " %s" + (1 - sep);
                    ~~~~~~^~~~~~~~~~~
eval.c:1138:13: note: use array indexing to silence this warning
                p = " %s" + (1 - sep);
                          ^
                    &     [          ]
1 warning generated.

...

jobs.c:1424:16: warning: adding 'int' to a string does not append to the string [-Wstring-plus-int]
                        str = "\"}" + !(quoted & 1);
                              ~~~~~~^~~~~~~~~~~~~~~
jobs.c:1424:16: note: use array indexing to silence this warning
                        str = "\"}" + !(quoted & 1);
                                    ^
                              &     [              ]
1 warning generated.
-----------------------------------------------------------------------

While the code itself is fine and the warnings are indeed harmless,
fixing them also makes the semantic more explicit: what it is actually
being increased is the address which points to the start of the string
in order to skip the initial character when some conditions are met.

Signed-off-by: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions
der'>2019-02-23Add C-n and C-p key bindings to switch windowsJune McEnroe 2019-02-23Change example command to join #ascii.town on freenodeJune McEnroe 2019-02-23Call def_prog_mode after termNoFlowJune McEnroe So that the settings get restored after /url or /man. 2019-02-22Move IRC formatting reset to C-sJune McEnroe Opens C-n for window switching. 2019-02-22Disable terminal flow controlJune McEnroe This opens up C-o, C-q and C-s for key bindings without C-v. 2019-02-22Bind up and down arrows to scrollJune McEnroe Honestly it's kind of weird that IRC clients usually use these for input history. 2019-02-22Remove topic TODOJune McEnroe I played around with it and it doesn't look right unless there is only one channel listed in the status. 2019-02-22Add /znc commandJune McEnroe Only because ZNC tells you to use it and expects it to work. 2019-02-22Update status line after scrolling and term eventsJune McEnroe 2019-02-22Reorganize input.cJune McEnroe 2019-02-22Fix name of <raw> window in man pageJune McEnroe 2019-02-22Rename global tags with angle bracketsJune McEnroe 2019-02-22Show status window while connectingJune McEnroe 2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe It's actually in a good state now, I think. 2019-02-21Replace "view" with "window"June McEnroe I think originally I didn't want to use the same word as curses WINDOW but it's really much clearer for the user if they're just called windows. UI code probably needs yet another rewrite though. Still feels messy. 2019-02-21Remove ROT13June McEnroe It's just not convenient when it can only do the whole line... 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe Otherwise the "Traveling" message isn't visible while connecting. 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe