Skip to content

build noise for Imager::Font::W32 on cygwin #570

Description

@tonycoz
n file included from win32.c:5:
win32.c: In function 'i_wf_bbox':
win32.c:65:14: warning: format '%d' expects argument of type 'int', but argument 4 has type 'i_img_dim' {aka 'long int'} [-Wformat=]
   65 |   mm_log((1, "i_wf_bbox(face %s, size %d, text %p, length %d, bbox %p, utf8 %d)\n", face, size, text, length, bbox, utf8));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        ~~~~
      |                                                                                           |
      |                                                                                           i_img_dim {aka long int}
../imext.h:258:56: note: in definition of macro 'mm_log'
  258 | #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
      |                                                        ^
win32.c:65:40: note: format string is defined here
   65 |   mm_log((1, "i_wf_bbox(face %s, size %d, text %p, length %d, bbox %p, utf8 %d)\n", face, size, text, length, bbox, utf8));
      |                                       ~^
      |                                        |
      |                                        int
      |                                       %ld
win32.c:65:14: warning: format '%d' expects argument of type 'int', but argument 6 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
   65 |   mm_log((1, "i_wf_bbox(face %s, size %d, text %p, length %d, bbox %p, utf8 %d)\n", face, size, text, length, bbox, utf8));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                    ~~~~~~
      |                                                                                                       |
      |                                                                                                       size_t {aka long unsigned int}
../imext.h:258:56: note: in definition of macro 'mm_log'
  258 | #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
      |                                                        ^
win32.c:65:60: note: format string is defined here
   65 |   mm_log((1, "i_wf_bbox(face %s, size %d, text %p, length %d, bbox %p, utf8 %d)\n", face, size, text, length, bbox, utf8));
      |                                                           ~^
      |                                                            |
      |                                                            int
      |                                                           %ld
win32.c:110:18: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
  110 |       mm_log((2, "  glyph '%c' (%02x): bbx (%u,%u) org (%d,%d) inc(%d,%d)\n",
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  111 |               cp, c, gm.gmBlackBoxX, gm.gmBlackBoxY, gm.gmptGlyphOrigin.x,
      |                   ~
      |                   |
      |                   long unsigned int
../imext.h:258:56: note: in definition of macro 'mm_log'
  258 | #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
      |                                                        ^
win32.c:110:36: note: format string is defined here
  110 |       mm_log((2, "  glyph '%c' (%02x): bbx (%u,%u) org (%d,%d) inc(%d,%d)\n",
      |                                 ~~~^
      |                                    |
      |                                    unsigned int
      |                                 %02lx
win32.c:120:20: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'long unsigned int' [-Wformat=]
  120 |         mm_log((1, "  glyph '%c' (%02x): error %d\n", cp, c, GetLastError()));
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~      ~
      |                                                           |
      |                                                           long unsigned int
../imext.h:258:56: note: in definition of macro 'mm_log'
  258 | #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
      |                                                        ^
win32.c:120:38: note: format string is defined here
  120 |         mm_log((1, "  glyph '%c' (%02x): error %d\n", cp, c, GetLastError()));
      |                                   ~~~^
      |                                      |
      |                                      unsigned int
      |                                   %02lx
win32.c:160:16: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]
  160 |     mm_log((1, "first: %d A: %d  B: %d  C: %d\n", first_ch,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~
      |                                                   |
      |                                                   long unsigned int
../imext.h:258:56: note: in definition of macro 'mm_log'
  258 | #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
      |                                                        ^
win32.c:160:25: note: format string is defined here
  160 |     mm_log((1, "first: %d A: %d  B: %d  C: %d\n", first_ch,
      |                        ~^
      |                         |
      |                         int
      |                        %ld
win32.c:162:16: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]
  162 |     mm_log((1, "last: %d A: %d  B: %d  C: %d\n", last_ch,
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~
      |                                                  |
      |                                                  long unsigned int
../imext.h:258:56: note: in definition of macro 'mm_log'
  258 | #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
      |                                                        ^
win32.c:162:24: note: format string is defined here
  162 |     mm_log((1, "last: %d A: %d  B: %d  C: %d\n", last_ch,
      |                       ~^
      |                        |
      |                        int
      |                       %ld
win32.c: In function 'i_wf_text':
win32.c:210:14: warning: too many arguments for format [-Wformat-extra-args]
  210 |   mm_log((1, "i_wf_text(face %s, im %p, tx %" i_DF ", ty %" i_DF ", cl %p, size %" i_DF ", text %p, length %lu, align %d, aa %d,  utf8 %d)\n", face, im, i_DFcp(tx, ty), cl, i_DFc(size), text, (unsigned long)len, align, aa, aa, utf8));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../imext.h:258:56: note: in definition of macro 'mm_log'
  258 | #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
      |                                                        ^
win32.c: In function 'i_wf_cp':
win32.c:262:14: warning: too many arguments for format [-Wformat-extra-args]
  262 |   mm_log((1, "i_wf_cp(face %s, im %p, tx %" i_DF ", ty %" i_DF ", channel %d, size %" i_DF ", text %p, length %lu, align %d, aa %d,  utf8 %d)\n", face, im, i_DFcp(tx, ty), channel, i_DFc(size), text, (unsigned long)len, align, aa, aa, utf8));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../imext.h:258:56: note: in definition of macro 'mm_log'
  258 | #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
      |                                                        ^
win32.c: In function 'i_wf_addfont':
win32.c:345:14: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'DWORD' {aka 'unsigned int'} [-Wformat=]
  345 |   mm_log((1, "i_wf_addfont failed: %ld\n", GetLastError()));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
      |                                            |
      |                                            DWORD {aka unsigned int}
../imext.h:258:56: note: in definition of macro 'mm_log'
  258 | #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
      |                                                        ^
win32.c:345:38: note: format string is defined here
  345 |   mm_log((1, "i_wf_addfont failed: %ld\n", GetLastError()));
      |                                    ~~^
      |                                      |
      |                                      long int
      |                                    %d
win32.c:346:47: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'DWORD' {aka 'unsigned int'} [-Wformat=]
  346 |   i_push_errorf(0, "Could not add resource: %ld", GetLastError());
      |                                             ~~^   ~~~~~~~~~~~~~~
      |                                               |   |
      |                                               |   DWORD {aka unsigned int}
      |                                               long int
      |                                             %d
win32.c: In function 'i_wf_delfont':
win32.c:374:14: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'DWORD' {aka 'unsigned int'} [-Wformat=]
  374 |   mm_log((1, "i_wf_delfont failed: %ld\n", GetLastError()));
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~~~~~
      |                                            |
      |                                            DWORD {aka unsigned int}
../imext.h:258:56: note: in definition of macro 'mm_log'
  258 | #define mm_log(x) { i_lhead(__FILE__,__LINE__); i_loog x; }
      |                                                        ^
win32.c:374:38: note: format string is defined here
  374 |   mm_log((1, "i_wf_delfont failed: %ld\n", GetLastError()));
      |                                    ~~^
      |                                      |
      |                                      long int
      |                                    %d
win32.c:375:50: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'DWORD' {aka 'unsigned int'} [-Wformat=]
  375 |   i_push_errorf(0, "Could not remove resource: %ld", GetLastError());
      |                                                ~~^   ~~~~~~~~~~~~~~
      |                                                  |   |
      |                                                  |   DWORD {aka unsigned int}
      |                                                  long int
      |                                                %d
win32.c: In function 'render_text':
win32.c:480:70: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'DWORD' {aka 'unsigned int'} [-Wformat=]
  480 |         i_push_errorf(0, "Could not create DIB section for render: %ld",
      |                                                                    ~~^
      |                                                                      |
      |                                                                      long int
      |                                                                    %d
  481 |                       GetLastError());
      |                       ~~~~~~~~~~~~~~                                  
      |                       |
      |                       DWORD {aka unsigned int}
win32.c:494:58: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'DWORD' {aka 'unsigned int'} [-Wformat=]
  494 |       i_push_errorf(0, "Could not create logical font: %ld",
      |                                                        ~~^
      |                                                          |
      |                                                          long int
      |                                                        %d
  495 |                     GetLastError());
      |                     ~~~~~~~~~~~~~~                        
      |                     |
      |                     DWORD {aka unsigned int}
win32.c:504:56: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'DWORD' {aka 'unsigned int'} [-Wformat=]
  504 |     i_push_errorf(0, "Could not create rendering DC: %ld", GetLastError());
      |                                                      ~~^   ~~~~~~~~~~~~~~
      |                                                        |   |
      |                                                        |   DWORD {aka unsigned int}
      |                                                        long int
      |                                                      %d
win32.c: In function 'utf8_to_wide_string':
win32.c:553:49: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'DWORD' {aka 'unsigned int'} [-Wformat=]
  553 |     i_push_errorf(0, "Could not convert utf8: %ld", GetLastError());
      |                                               ~~^   ~~~~~~~~~~~~~~
      |                                                 |   |
      |                                                 |   DWORD {aka unsigned int}
      |                                                 long int
      |                                               %d
win32.c:559:49: warning: format '%ld' expects argument of type 'long int', but argument 3 has type 'DWORD' {aka 'unsigned int'} [-Wformat=]
  559 |     i_push_errorf(0, "Could not convert utf8: %ld", GetLastError());
      |                                               ~~^   ~~~~~~~~~~~~~~
      |                                                 |   |
      |                                                 |   DWORD {aka unsigned int}
      |                                                 long int
      |                                               %d

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions