diff options
author | Stéphane Aulery <saulery@free.fr> | 2014-11-08 18:00:26 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2014-11-17 14:31:49 +0100 |
commit | 6e81ca91fa8e62ca6fb5ba41c45bbd6a605d514c (patch) | |
tree | 23098f39c8e233100e892fd2615c2b4ee2c815b3 /ida.c | |
parent | b1ad6e37beddb396f7cbd1fd1dca48036d85c016 (diff) | |
download | fbida-6e81ca91fa8e62ca6fb5ba41c45bbd6a605d514c.tar.gz |
Fix cppcheck warning %d in format string requires 'int' but the argument type is 'unsigned int'
Signed-off-by: Stéphane Aulery <saulery@free.fr>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ida.c')
-rw-r--r-- | ida.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -726,13 +726,13 @@ resize_shell(void) else base = ida->file; title = malloc(strlen(base)+128); - len = sprintf(title,"%s (%dx%d", base, + len = sprintf(title,"%s (%ux%u", base, ida->img.i.width, ida->img.i.height); if (ida->img.i.dpi) - len += sprintf(title+len," | %d dpi", + len += sprintf(title+len," | %u dpi", ida->img.i.dpi); if (ida->img.i.npages > 1) - len += sprintf(title+len," | page %d/%d", + len += sprintf(title+len," | page %d/%u", cpage+1, ida->img.i.npages); len += sprintf(title+len," | %d%%)", viewer_i2s(ida->zoom,100)); XtVaSetValues(app_shell, XtNtitle,title, @@ -1593,7 +1593,7 @@ resize_sync_cb(Widget widget, XtPointer client_data, XtPointer calldata) /* radio buttons pressed */ if (h->size == widget && XmToggleButtonGetState(h->size)) { XmToggleButtonSetState(h->res,0,False); - sprintf(buf,"%d", ida->img.i.dpi); + sprintf(buf,"%u", ida->img.i.dpi); h->rupdate++; XmTextSetString(h->tr,buf); XtVaSetValues(h->tr,XmNsensitive,False,NULL); @@ -1671,11 +1671,11 @@ resize_ac(Widget widget, XEvent *event, String *params, Cardinal *num) h->label = XtVaCreateManagedWidget("label", xmLabelWidgetClass, rc, NULL); - sprintf(buf,"%d",ida->img.i.width); + sprintf(buf,"%u",ida->img.i.width); XmTextSetString(h->tx,buf); - sprintf(buf,"%d",ida->img.i.height); + sprintf(buf,"%u",ida->img.i.height); XmTextSetString(h->ty,buf); - sprintf(buf,"%d",ida->img.i.dpi); + sprintf(buf,"%u",ida->img.i.dpi); XmTextSetString(h->tr,buf); XtVaSetValues(h->tr,XmNsensitive,False,NULL); XmToggleButtonSetState(h->lock,1,False); |