[FFmpeg-devel] [PATCH] vhook/{fish, ppm}.c: Fix compilation warnings

Patrik Kullman patrik
Sat Feb 14 12:27:22 CET 2009


Even though VHOOK is deprecated, I thought that making it compile as
cleanly as possible would be a good thing before the release.

But also since it's deprecated, I thought I'd submit everything in one
patch.

These are the warnings I try to prevent:

vhook/fish.c: In function ?Configure?:
vhook/fish.c:130: warning: assignment discards qualifiers from pointer target type

Patch: Use av_strlcpy

vhook/fish.c: In function ?Process?:
vhook/fish.c:371: warning: ignoring return value of ?fwrite?, declared with attribute warn_unused_result
vhook/ppm.c: In function ?rwpipe_open?:
vhook/ppm.c:59: warning: ignoring return value of ?pipe?, declared with attribute warn_unused_result
vhook/ppm.c:60: warning: ignoring return value of ?pipe?, declared with attribute warn_unused_result
vhook/ppm.c: In function ?rwpipe_read_ppm_header?:
vhook/ppm.c:163: warning: ignoring return value of ?fgets?, declared with attribute warn_unused_result

Patch: Handle the return values

vhook/ppm.c: In function ?Process?:
vhook/ppm.c:236: warning: ?out_height? may be used uninitialized in this function
vhook/ppm.c:235: warning: ?out_width? may be used uninitialized in this function

Patch: False positives, use av_uninit() macro
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-vhook-compilation_warnings.patch
Type: text/x-patch
Size: 1980 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090214/2ea99606/attachment.bin>



More information about the ffmpeg-devel mailing list