@@ -155,24 +155,25 @@ static void attribute((noreturn)) help(void) {
155155 "\n"
156156 "Quick and dirty SFTP client\n"
157157 "\n" );
158- xprintf ("Options:\n"
159- " --help, -h Display usage message\n"
160- " --version, -V Display version number\n"
161- " -r, --dropbear Use dbclient instead of ssh\n"
162- " -B, --buffer BYTES Select buffer size (default 8192)\n"
163- " -b, --batch PATH Read batch file\n"
164- " -P, --program PATH Execute program as SFTP server\n"
165- " -R, --requests COUNT Maximum outstanding requests (default 8)\n"
166- " -s, --subsystem NAME Remote subsystem name\n"
167- " -S, --sftp-version VER Protocol version to request (default 3)\n"
168- " --echo Echo commands\n"
169- " --quirk-openssh Server gets SSH_FXP_SYMLINK backwards\n"
170- "Options passed to SSH:\n"
171- " -1, -2 Select protocol version\n"
172- " -C Enable compression\n"
173- " -F PATH Use alternative config file\n"
174- " -o OPTION Pass option to client\n"
175- " -v Raise logging level\n" );
158+ xprintf (
159+ "Options:\n"
160+ " --help, -h Display usage message\n"
161+ " --version, -V Display version number\n"
162+ " -r, --dropbear Use dbclient instead of ssh\n"
163+ " -B, --buffer BYTES Select buffer size (default 8192)\n"
164+ " -b, --batch PATH Read batch file\n"
165+ " -P, --program PATH Execute program as SFTP server\n"
166+ " -R, --requests COUNT Maximum outstanding requests (default 8)\n"
167+ " -s, --subsystem NAME Remote subsystem name\n"
168+ " -S, --sftp-version VER Protocol version to request (default 3)\n"
169+ " --echo Echo commands\n"
170+ " --quirk-openssh Server gets SSH_FXP_SYMLINK backwards\n"
171+ "Options passed to SSH:\n"
172+ " -1, -2 Select protocol version\n"
173+ " -C Enable compression\n"
174+ " -F PATH Use alternative config file\n"
175+ " -o OPTION Pass option to client\n"
176+ " -v Raise logging level\n" );
176177 exit (0 );
177178}
178179
@@ -779,8 +780,8 @@ static int sftp_open(const char *path, uint32_t desired_access, uint32_t flags,
779780 else
780781 pflags |= SSH_FXF_TEXT ;
781782 }
782- if (flags & (uint32_t )~(SSH_FXF_ACCESS_DISPOSITION | SSH_FXF_APPEND_DATA |
783- SSH_FXF_APPEND_DATA_ATOMIC | SSH_FXF_TEXT_MODE ))
783+ if (flags & (uint32_t ) ~(SSH_FXF_ACCESS_DISPOSITION | SSH_FXF_APPEND_DATA |
784+ SSH_FXF_APPEND_DATA_ATOMIC | SSH_FXF_TEXT_MODE ))
784785 return error ("future SSH_FXP_OPEN flags (%#" PRIx32
785786 ") cannot be emulated in protocol %d" ,
786787 flags , protocol -> version );
@@ -918,6 +919,7 @@ static int sftp_statvfs(const char *path, struct statvfs_reply *sr) {
918919 sftp_send_path (& fakejob , & fakeworker , path );
919920 sftp_send_end (& fakeworker );
920921 getresponse (SSH_FXP_EXTENDED_REPLY , id , statvfs_extension );
922+ memset (sr , 0 , sizeof * sr ); // workaround overenthusiastic warning with LTO
921923 cpcheck (sftp_parse_uint64 (& fakejob , & sr -> bsize ));
922924 cpcheck (sftp_parse_uint64 (& fakejob , & sr -> frsize ));
923925 cpcheck (sftp_parse_uint64 (& fakejob , & sr -> blocks ));
@@ -1871,9 +1873,9 @@ static int cmd_put(int ac, char **av) {
18711873 /* Mask out things that don't make sense: we set the size by dint of
18721874 * uploading data, we don't want to try to set a numeric UID or GID, and we
18731875 * cannot set the allocation size or link count. */
1874- attrs .valid &= ( uint32_t )~( SSH_FILEXFER_ATTR_SIZE
1875- | SSH_FILEXFER_ATTR_LINK_COUNT
1876- | SSH_FILEXFER_ATTR_UIDGID );
1876+ attrs .valid &=
1877+ ( uint32_t ) ~( SSH_FILEXFER_ATTR_SIZE | SSH_FILEXFER_ATTR_LINK_COUNT |
1878+ SSH_FILEXFER_ATTR_UIDGID );
18771879 /* Mask off attributes that don't work in this protocol version */
18781880 attrs .valid &= attrmask ;
18791881 assert (!(attrs .valid & SSH_FILEXFER_ATTR_CTIME ));
0 commit comments