[sleuthkit-developers] printf format conversion warning in hfs_dent.c
Brought to you by:
carrier
From: Aaron B. <aar...@gm...> - 2010-04-19 09:53:01
|
Hi, I got the following warning from Xcode's Clang compiler (I included all the detail to show the excellent error reporting from Clang. View with a monospace font). The variable "r" is declared as TSKConversionResult, which is an enum. sizeof() an enum on Mac OS X is 32-bits for both 32-bit and 64-bit architectures, but I don't know about other platforms. Aaron sleuthkit/xcode/../tsk3/fs/hfs_dent.c:127:10:{127:9-128:72}{127:9-128:72}: warning: conversion specifies type 'unsigned char' but the argument has type 'unsigned int' [-Wformat] snprintf(tsk_errstr, TSK_ERRSTR_L, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sleuthkit/xcode/../tsk3/fs/hfs_dent.c:128:60: note: instantiated from: "hfs_uni2ascii: unicode conversion failed (%" PRIu8 ")", r); ~~~^~~~~ ~ In file included from sleuthkit/xcode/../tsk3/fs/hfs_dent.c:72: In file included from sleuthkit/xcode/../tsk3/fs/tsk_fs_i.h:39: In file included from sleuthkit/xcode/../tsk3/base/tsk_base_i.h:26: In file included from sleuthkit/xcode/../tsk3/base/tsk_base.h:52: In file included from sleuthkit/xcode/../tsk3/tsk_incs.h:8: /usr/include/inttypes.h:60:52: note: instantiated from: # define PRIu8 __PRI_8_LENGTH_MODIFIER__ "u" ^ |