muriloventuroso / easyssh

The SSH connection manager to make your life easier.
GNU General Public License v3.0
523 stars 39 forks source link

Lessen warnings on build #139

Closed ryonakano closed 3 years ago

ryonakano commented 3 years ago

Before

../src/Widgets/TerminalWidget.vala:137.29-137.40: warning: `Gtk.show_uri' has been deprecated since 3.22
../src/Widgets/TerminalWidget.vala:174.17-174.31: warning: `Vte.Terminal.spawn_sync' has been deprecated since 0.48
../src/Widgets/TerminalWidget.vala:181.25-181.39: warning: `Vte.Terminal.spawn_sync' has been deprecated since 0.48
../src/Widgets/TerminalWidget.vala:174.17-175.101: warning: unhandled error `GLib.Error'
../src/Widgets/SearchToolbar.vala:97.21-97.42: warning: `Vte.Terminal.search_set_gregex' has been deprecated since 0.46
../src/Views/SourceListView.vala:1071.21-1071.34: warning: unhandled error `GLib.Error'
                    file.delete ();
                    ^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:1073.49-1073.97: warning: unhandled error `GLib.Error'
                var dos = new DataOutputStream (file.create (FileCreateFlags.REPLACE_DESTINATION));
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:1075.17-1075.37: warning: unhandled error `GLib.IOError'
                dos.put_string (data);
                ^^^^^^^^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:1082.25-1082.42: warning: unhandled error `GLib.Error'
                        file_ssh.delete ();
                        ^^^^^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:1084.57-1084.109: warning: unhandled error `GLib.Error'
                    var dos_ssh = new DataOutputStream (file_ssh.create (FileCreateFlags.REPLACE_DESTINATION));
                                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:1085.21-1085.56: warning: unhandled error `GLib.IOError'
                    dos_ssh.put_string (data_ssh_config);
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:935.17-935.27: warning: `null' incompatible with return type `EasySSH.Host'
                return null;
                ^^^^^^^^^^^
../src/Views/SourceListView.vala:1124.21-1124.34: warning: unhandled error `GLib.Error'
                    file.delete ();
                    ^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:1126.49-1126.97: warning: unhandled error `GLib.Error'
                var dos = new DataOutputStream (file.create (FileCreateFlags.REPLACE_DESTINATION));
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:1128.17-1128.37: warning: unhandled error `GLib.IOError'
                dos.put_string (data);
                ^^^^^^^^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:1165.21-1165.34: warning: unhandled error `GLib.Error'
                    file.delete ();
                    ^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:1167.49-1167.97: warning: unhandled error `GLib.Error'
                var dos = new DataOutputStream (file.create (FileCreateFlags.REPLACE_DESTINATION));
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:1169.17-1169.37: warning: unhandled error `GLib.IOError'
                dos.put_string (data);
                ^^^^^^^^^^^^^^^^^^^^^
../src/Views/SourceListView.vala:138.13-138.27: warning: `Gtk.Widget.margin_left' has been deprecated since 3.12
../src/MainWindow.vala:472.13-472.82: warning: unhandled error `GLib.SpawnError'
            Process.spawn_command_line_async (default_filemanager + " " + command);
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/MainWindow.vala:233.13-236.41: warning: unhandled error `GLib.SpawnError'
../src/MainWindow.vala:243.13-246.41: warning: unhandled error `GLib.SpawnError'
../src/Widgets/TerminalBox.vala:220.17-220.21: warning: local variable `n_cmd' declared but never used
            var n_cmd = cmd + "\n";
                ^^^^^
Compilation succeeded - 23 warning(s)

After

../src/Widgets/TerminalWidget.vala:175.21-175.35: warning: `Vte.Terminal.spawn_sync' has been deprecated since 0.48
../src/Widgets/TerminalWidget.vala:185.25-185.39: warning: `Vte.Terminal.spawn_sync' has been deprecated since 0.48
../src/Widgets/SearchToolbar.vala:97.21-97.42: warning: `Vte.Terminal.search_set_gregex' has been deprecated since 0.46
../src/MainWindow.vala:472.13-472.82: warning: unhandled error `GLib.SpawnError'
            Process.spawn_command_line_async (default_filemanager + " " + command);
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../src/MainWindow.vala:233.13-236.41: warning: unhandled error `GLib.SpawnError'
../src/MainWindow.vala:243.13-246.41: warning: unhandled error `GLib.SpawnError'
Compilation succeeded - 6 warning(s)