gypsy-0.9-format.patch 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. diff -up gypsy-0.9/src/gypsy-client.c.format gypsy-0.9/src/gypsy-client.c
  2. --- gypsy-0.9/src/gypsy-client.c.format 2011-12-06 13:59:36.000000000 +0100
  3. +++ gypsy-0.9/src/gypsy-client.c 2017-10-02 23:54:53.450486922 +0200
  4. @@ -401,7 +401,7 @@ garmin_init (GIOChannel *channel)
  5. if (status != G_IO_STATUS_NORMAL) {
  6. GYPSY_NOTE (CLIENT, "GARMIN: Error writing \"Private Set Mode\" packet:\n%s", g_strerror (errno));
  7. - g_set_error (&error, GYPSY_ERROR, errno, g_strerror (errno));
  8. + g_set_error (&error, GYPSY_ERROR, errno, "%s", g_strerror (errno));
  9. return FALSE;
  10. }
  11. @@ -428,7 +428,7 @@ garmin_init (GIOChannel *channel)
  12. if (status != G_IO_STATUS_NORMAL) {
  13. GYPSY_NOTE (CLIENT, "GARMIN: Error writing \"Start PVT Transfer\" packet:\n%s", g_strerror (errno));
  14. - g_set_error (&error, GYPSY_ERROR, errno, g_strerror (errno));
  15. + g_set_error (&error, GYPSY_ERROR, errno, "%s", g_strerror (errno));
  16. return FALSE;
  17. }
  18. @@ -593,7 +593,7 @@ gypsy_client_start (GypsyClient *client,
  19. if (priv->fd == -1) {
  20. g_warning ("Error opening device %s: %s", priv->device_path, g_strerror (errno));
  21. - g_set_error (error, GYPSY_ERROR, errno, g_strerror (errno));
  22. + g_set_error (error, GYPSY_ERROR, errno, "%s", g_strerror (errno));
  23. return FALSE;
  24. }
  25. @@ -602,7 +602,7 @@ gypsy_client_start (GypsyClient *client,
  26. if (tcgetattr (priv->fd, &term) < 0) {
  27. g_warning ("Error getting term: %s", g_strerror (errno));
  28. - g_set_error (error, GYPSY_ERROR, errno, g_strerror (errno));
  29. + g_set_error (error, GYPSY_ERROR, "%s", errno, g_strerror (errno));
  30. return FALSE;
  31. }
  32. @@ -612,7 +612,7 @@ gypsy_client_start (GypsyClient *client,
  33. if (tcsetattr (priv->fd, TCSAFLUSH, &term) < 0) {
  34. g_warning ("Error setting term: %s", g_strerror (errno));
  35. - g_set_error (error, GYPSY_ERROR, errno, g_strerror (errno));
  36. + g_set_error (error, GYPSY_ERROR, errno, "%s", g_strerror (errno));
  37. return FALSE;
  38. }
  39. }
  40. @@ -653,7 +653,7 @@ gypsy_client_start (GypsyClient *client,
  41. if (status != G_IO_STATUS_NORMAL) {
  42. g_warning ("Error setting flags: %s", g_strerror (errno));
  43. - g_set_error (error, GYPSY_ERROR, errno, g_strerror (errno));
  44. + g_set_error (error, GYPSY_ERROR, errno, "%s", g_strerror (errno));
  45. return FALSE;
  46. }
  47. @@ -662,7 +662,7 @@ gypsy_client_start (GypsyClient *client,
  48. if (status != G_IO_STATUS_NORMAL) {
  49. g_warning ("Error setting encoding: %s", g_strerror (errno));
  50. - g_set_error (error, GYPSY_ERROR, errno, g_strerror (errno));
  51. + g_set_error (error, GYPSY_ERROR, errno, "%s", g_strerror (errno));
  52. return FALSE;
  53. }
  54. @@ -692,7 +692,7 @@ gypsy_client_start (GypsyClient *client,
  55. }
  56. g_warning ("Error connecting: %s", g_strerror (errno));
  57. - g_set_error (error, GYPSY_ERROR, errno, g_strerror (errno));
  58. + g_set_error (error, GYPSY_ERROR, errno, "%s", g_strerror (errno));
  59. g_source_remove (priv->error_id);
  60. priv->error_id = 0;
  61. diff -up gypsy-0.9/src/main.c.format gypsy-0.9/src/main.c
  62. --- gypsy-0.9/src/main.c.format 2017-10-02 23:50:18.273403357 +0200
  63. +++ gypsy-0.9/src/main.c 2017-10-02 23:55:37.686178566 +0200
  64. @@ -156,7 +156,7 @@ main (int argc,
  65. #if GLIB_CHECK_VERSION(2, 14, 0)
  66. char *help;
  67. help = g_option_context_get_help (context, TRUE, NULL);
  68. - g_print (help);
  69. + g_print ("%s", help);
  70. g_free (help);
  71. #else
  72. g_printerr ("Cannot parse arguments: %s\n", error->message);