tweaks: avoid an unused-variable warning for the tiny version
The extra variable is not needed, because when having read from standard input, the filename will simply be empty. It will not be empty for any other file that was read.master
parent
3719d8e208
commit
8fbf10428c
|
@ -2534,7 +2534,6 @@ int main(int argc, char **argv)
|
||||||
/* Read the files mentioned on the command line into new buffers. */
|
/* Read the files mentioned on the command line into new buffers. */
|
||||||
while (optind < argc && (!openfile || ISSET(MULTIBUFFER))) {
|
while (optind < argc && (!openfile || ISSET(MULTIBUFFER))) {
|
||||||
ssize_t givenline = 0, givencol = 0;
|
ssize_t givenline = 0, givencol = 0;
|
||||||
bool dash = FALSE;
|
|
||||||
|
|
||||||
/* If there's a +LINE[,COLUMN] argument here, eat it up. */
|
/* If there's a +LINE[,COLUMN] argument here, eat it up. */
|
||||||
if (optind < argc - 1 && argv[optind][0] == '+') {
|
if (optind < argc - 1 && argv[optind][0] == '+') {
|
||||||
|
@ -2547,7 +2546,6 @@ int main(int argc, char **argv)
|
||||||
if (strcmp(argv[optind], "-") == 0) {
|
if (strcmp(argv[optind], "-") == 0) {
|
||||||
if (!scoop_stdin())
|
if (!scoop_stdin())
|
||||||
continue;
|
continue;
|
||||||
dash = TRUE;
|
|
||||||
optind++;
|
optind++;
|
||||||
} else if (!open_buffer(argv[optind++], FALSE))
|
} else if (!open_buffer(argv[optind++], FALSE))
|
||||||
continue;
|
continue;
|
||||||
|
@ -2556,7 +2554,7 @@ int main(int argc, char **argv)
|
||||||
if (givenline != 0 || givencol != 0)
|
if (givenline != 0 || givencol != 0)
|
||||||
do_gotolinecolumn(givenline, givencol, FALSE, FALSE);
|
do_gotolinecolumn(givenline, givencol, FALSE, FALSE);
|
||||||
#ifndef DISABLE_HISTORIES
|
#ifndef DISABLE_HISTORIES
|
||||||
else if (ISSET(POS_HISTORY) && !dash) {
|
else if (ISSET(POS_HISTORY) && openfile->filename[0] != '\0') {
|
||||||
ssize_t savedline, savedcol;
|
ssize_t savedline, savedcol;
|
||||||
/* If edited before, restore the last cursor position. */
|
/* If edited before, restore the last cursor position. */
|
||||||
if (has_old_position(argv[optind - 1], &savedline, &savedcol))
|
if (has_old_position(argv[optind - 1], &savedline, &savedcol))
|
||||||
|
|
Loading…
Reference in New Issue