1. 13 Mar, 2022 1 commit
    • Evangelos Ribeiro Tzaras's avatar
      mmsd: Fix total max attachment size · 1ff348a0
      Evangelos Ribeiro Tzaras authored
      On amd64 and arm64 gsize is typedef'ed to unsigned long (64 bit wide).
      The "i" GVariant format string is for gint32 the g_variant_get() family of
      functions (g_variant_dict_lookup in this case).
      
      Therefore we must initialize the gsize typed value to zero to make sure we don't
      end up with random memory in the upper bits.
      
      Fixes 9c627f52
      
      Closes #686
      1ff348a0
  2. 01 Mar, 2022 1 commit
  3. 27 Feb, 2022 3 commits
    • Evangelos Ribeiro Tzaras's avatar
      matrix: Use G_GSIZE_FORMAT as format identifier for size types · f0996baf
      Evangelos Ribeiro Tzaras authored
      In file included from ../src/matrix/matrix-api.c:29:
      ../src/matrix/matrix-api.c: In function ‘handle_one_time_keys’:
      ../src/matrix/matrix-api.c:554:23: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘size_t’ {aka ‘unsigned int’} [-Wformat=]
        554 |     CHATTY_TRACE_MSG ("generating %lu onetime keys", limit - count);
            |                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~
            |                                                            |
            |                                                            size_t {aka unsigned int}
      ../src/chatty-log.h:25:26: note: in definition of macro ‘CHATTY_TRACE_MSG’
         25 |               G_STRFUNC, fmt, ##__VA_ARGS__)
            |                          ^~~
      ../src/matrix/matrix-api.c:554:37: note: format string is defined here
        554 |     CHATTY_TRACE_MSG ("generating %lu onetime keys", limit - count);
            |                                   ~~^
            |                                     |
            |                                     long unsigned int
            |                                   %u
      f0996baf
    • Evangelos Ribeiro Tzaras's avatar
      mmsd: Use gsize type and suitable format identifier · 9c627f52
      Evangelos Ribeiro Tzaras authored
      Fixes warnings on some architectures:
      
      ../src/mm/chatty-mmsd.c: In function ‘chatty_mmsd_send_mms_create_attachments’:
      ../src/mm/chatty-mmsd.c:485:18: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 7 has type ‘gsize’ {aka ‘unsigned int’} [-Wformat=]
        485 |       g_warning ("Size of attachments that can't be resized %ld greater then maximum attachment size %d",
            |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        486 |                  other_attachments_size, self->max_attach_size);
            |                  ~~~~~~~~~~~~~~~~~~~~~~
            |                  |
            |                  gsize {aka unsigned int}
      /usr/include/glib-2.0/glib/gmessages.h:323:63: note: in definition of macro ‘g_warning’
        323 |                                                    G_STRFUNC, __VA_ARGS__)
            |                                                               ^~~~~~~~~~~
      ../src/mm/chatty-mmsd.c:485:63: note: format string is defined here
        485 |       g_warning ("Size of attachments that can't be resized %ld greater then maximum attachment size %d",
            |                                                             ~~^
            |                                                               |
            |                                                               long int
            |                                                             %d
      9c627f52
    • Evangelos Ribeiro Tzaras's avatar
      media: Use G_GSIZE_FORMAT as format identifier for size types · 8aba0ba9
      Evangelos Ribeiro Tzaras authored
      Fixes warnings on some architectures:
      
      ../src/chatty-media.c: In function ‘chatty_media_scale_image_to_size_sync’:
      ../src/chatty-media.c:205:16: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 8 has type ‘gsize’ {aka ‘unsigned int’} [-Wformat=]
        205 |       g_debug ("Resized at quality %s to size %lu", *quality, new_size);
            |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~            ~~~~~~~~
            |                                                               |
            |                                                               gsize {aka unsigned int}
      /usr/include/glib-2.0/glib/gmessages.h:329:63: note: in definition of macro ‘g_debug’
        329 |                                                    G_STRFUNC, __VA_ARGS__)
            |                                                               ^~~~~~~~~~~
      ../src/chatty-media.c:205:49: note: format string is defined here
        205 |     ...
      8aba0ba9
  4. 25 Feb, 2022 1 commit
  5. 19 Feb, 2022 1 commit
  6. 08 Feb, 2022 1 commit
  7. 04 Feb, 2022 1 commit
  8. 03 Feb, 2022 3 commits
  9. 02 Feb, 2022 4 commits
  10. 01 Feb, 2022 6 commits
  11. 31 Jan, 2022 17 commits
  12. 28 Jan, 2022 1 commit