[Ocfs2-tools-devel] [PATCH 1/7] resize_slotmap: fix fprintf format build warnings

Joseph Qi joseph.qi at huawei.com
Wed Mar 16 18:05:25 PDT 2016


Hi all,
This series as well as append dio support and memory leak fixes are
still pending.
Hope we can push these into repo ASAP.

Thanks,
Joseph

On 2016/3/10 12:54, Gang He wrote:
> Hi Jeseph,
> 
> Sure thing.
> Hello, Goldwyn,
> Did you add our (Joseph, Junxiao and me) accounts in ocfs2-tools project on github?
> 
>  
> Thanks
> Gang
> 
> 
> 
>>>>
>> Hi Gang,
>> Could you help push those patches?
>>
>> Thanks,
>> Joseph
>>
>> On 2016/3/7 10:26, Gang He wrote:
>>>
>>>
>>>
>>>>>>
>>>> Fix the fprintf format build warning:
>>>> warning: format ‘%llu’ expects type ‘long long unsigned int’, but
>>>> argument 3 has type ‘uint64_t’
>>>>
>>>> Signed-off-by: Joseph Qi <joseph.qi at huawei.com>
>>> Reviewed-by: Gang He <ghe at suse.com>
>>>
>>>> ---
>>>>  extras/resize_slotmap.c | 12 ++++++------
>>>>  1 file changed, 6 insertions(+), 6 deletions(-)
>>>>
>>>> diff --git a/extras/resize_slotmap.c b/extras/resize_slotmap.c
>>>> index 0571e99..0195b96 100644
>>>> --- a/extras/resize_slotmap.c
>>>> +++ b/extras/resize_slotmap.c
>>>> @@ -70,23 +70,23 @@ static errcode_t resize_slot_map_file(ocfs2_filesys *fs, 
>>
>>>> uint64_t slotsize)
>>>>  	minsize = OCFS2_MAX_SLOTS * sizeof(struct ocfs2_extended_slot);
>>>>
>>>>  	if (slotsize > maxsize) {
>>>> -		fprintf(stderr, "Error: The requested size (%llu bytes) is "
>>>> -			"larger than the allocated size (%llu bytes).\n",
>>>> +		fprintf(stderr, "Error: The requested size (%"PRIu64" bytes) is "
>>>> +			"larger than the allocated size (%"PRIu64" bytes).\n",
>>>>  			slotsize, maxsize);
>>>>  		ret = OCFS2_ET_INVALID_ARGUMENT;
>>>>  		goto out;
>>>>  	}
>>>>
>>>>  	if (slotsize < minsize) {
>>>> -		fprintf(stderr, "Error: The requested size (%llu bytes) is "
>>>> +		fprintf(stderr, "Error: The requested size (%"PRIu64" bytes) is "
>>>>  			"smaller than the minimum acceptable size "
>>>> -			"(%llu bytes).\n", slotsize, minsize);
>>>> +			"(%"PRIu64" bytes).\n", slotsize, minsize);
>>>>  		ret = OCFS2_ET_INVALID_ARGUMENT;
>>>>  		goto out;
>>>>  	}
>>>>
>>>>  	fprintf(stdout, "About to change the size of //slotmap from %llu bytes "
>>>> -		"to %llu bytes.\nContinue(y/N)? ", di->i_size, slotsize);
>>>> +		"to %"PRIu64" bytes.\nContinue(y/N)? ", di->i_size, slotsize);
>>>>  	while (1) {
>>>>  		c = getchar();
>>>>  		if (!isalpha(c))
>>>> @@ -172,7 +172,7 @@ int main(int argc, char *argv[])
>>>>  	ret = resize_slot_map_file(fs, size);
>>>>  	if (!ret)
>>>>  		fprintf(stdout, "Changed the size of //slotmap on device "
>>>> -			"\"%s\" to %llu bytes.\n", device, size);
>>>> +			"\"%s\" to %"PRIu64" bytes.\n", device, size);
>>>>  	if (ret && ret != OCFS2_ET_TOO_MANY_SLOTS)
>>>>  		com_err(progname, ret, "while resizing //slotmap on device "
>>>>  			"\"%s\"", device);
>>>> -- 
>>>> 1.8.4.3
>>>
>>> .
>>>
> 
> .
> 





More information about the Ocfs2-tools-devel mailing list