Skip to content

Commit

Permalink
nxcodec: fix build warning
Browse files Browse the repository at this point in the history
nxcodec_main.c:143:37: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint32_t’ {aka ‘unsigned int’} [-Wformat=]
  143 |             printf("nxcodec size: %lux%lu\n",
      |                                   ~~^
      |                                     |
      |                                     long unsigned int
      |                                   %u
  144 |                    codec.output.format.fmt.pix.width,
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                               |
      |                                               uint32_t {aka unsigned int}
nxcodec_main.c:143:41: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint32_t’ {aka ‘unsigned int’} [-Wformat=]
  143 |             printf("nxcodec size: %lux%lu\n",
      |                                       ~~^
      |                                         |
      |                                         long unsigned int
      |                                       %u
  144 |                    codec.output.format.fmt.pix.width,
  145 |                    codec.output.format.fmt.pix.height);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                               |
      |                                               uint32_t {aka unsigned int}

Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
  • Loading branch information
shizhenghui authored and xiaoxiang781216 committed Oct 10, 2024
1 parent 8f50bf3 commit de8fae7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/nxcodec/nxcodec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ int main(int argc, FAR char **argv)
codec.capture.format.fmt.pix.width;
codec.output.format.fmt.pix.height =
codec.capture.format.fmt.pix.height;
printf("nxcodec size: %lux%lu\n",
printf("nxcodec size: %"PRIu32"x%"PRIu32"\n",
codec.output.format.fmt.pix.width,
codec.output.format.fmt.pix.height);

Expand Down

0 comments on commit de8fae7

Please sign in to comment.