diff --git a/wand/compare.c b/wand/compare.c index 5d3b966bf..6566d198e 100644 --- a/wand/compare.c +++ b/wand/compare.c @@ -292,7 +292,12 @@ WandExport MagickBooleanType CompareImageCommand(ImageInfo *image_info, } } if (argc < 3) - return(CompareUsage()); + { + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "MissingArgument","%s",""); + (void) CompareUsage(); + return(MagickFalse); + } restore_info=image_info; channels=DefaultChannels; difference_image=NewImageList(); diff --git a/wand/composite.c b/wand/composite.c index 2c7ad79f0..e098fdc5c 100644 --- a/wand/composite.c +++ b/wand/composite.c @@ -445,7 +445,12 @@ WandExport MagickBooleanType CompositeImageCommand(ImageInfo *image_info, } } if (argc < 4) - return(CompositeUsage()); + { + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "MissingArgument","%s",""); + (void) CompositeUsage(); + return(MagickFalse); + } GetCompositeOptions(&composite_options); filename=(char *) NULL; format="%w,%h,%m"; diff --git a/wand/conjure.c b/wand/conjure.c index 0d0a36de3..c9daee2ef 100644 --- a/wand/conjure.c +++ b/wand/conjure.c @@ -167,7 +167,12 @@ WandExport MagickBooleanType ConjureImageCommand(ImageInfo *image_info, if (IsEventLogging() != MagickFalse) (void) LogMagickEvent(TraceEvent,GetMagickModule(),"..."); if (argc < 2) - return(ConjureUsage()); + { + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "MissingArgument","%s",""); + (void) ConjureUsage(); + return(MagickFalse); + } image=NewImageList(); number_images=0; option=(char *) NULL; diff --git a/wand/convert.c b/wand/convert.c index 9afcb7cb2..db6eb61dd 100644 --- a/wand/convert.c +++ b/wand/convert.c @@ -541,7 +541,12 @@ WandExport MagickBooleanType ConvertImageCommand(ImageInfo *image_info, } } if (argc < 3) - return(ConvertUsage()); + { + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "MissingArgument","%s",""); + (void) ConvertUsage(); + return(MagickFalse); + } filename=(char *) NULL; format="%w,%h,%m"; j=1; diff --git a/wand/identify.c b/wand/identify.c index 988d21d24..3bd41f8a5 100644 --- a/wand/identify.c +++ b/wand/identify.c @@ -245,7 +245,12 @@ WandExport MagickBooleanType IdentifyImageCommand(ImageInfo *image_info, } } if (argc < 2) - return(IdentifyUsage()); + { + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "MissingArgument","%s",""); + (void) IdentifyUsage(); + return(MagickFalse); + } count=0; format=NULL; j=1; diff --git a/wand/mogrify.c b/wand/mogrify.c index acd8187d7..4d2dee273 100644 --- a/wand/mogrify.c +++ b/wand/mogrify.c @@ -3864,7 +3864,12 @@ WandExport MagickBooleanType MogrifyImageCommand(ImageInfo *image_info, } } if (argc < 2) - return(MogrifyUsage()); + { + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "MissingArgument","%s",""); + (void) MogrifyUsage(); + return(MagickFalse); + } format=(char *) NULL; path=(char *) NULL; global_colormap=MagickFalse; diff --git a/wand/montage.c b/wand/montage.c index ff4daa69b..7dc1e3bf8 100644 --- a/wand/montage.c +++ b/wand/montage.c @@ -327,7 +327,12 @@ WandExport MagickBooleanType MontageImageCommand(ImageInfo *image_info, } } if (argc < 3) - return(MontageUsage()); + { + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "MissingArgument","%s",""); + (void) MontageUsage(); + return(MagickFalse); + } format="%w,%h,%m"; first_scene=0; j=1; diff --git a/wand/stream.c b/wand/stream.c index 6b8df6d2e..570af84d7 100644 --- a/wand/stream.c +++ b/wand/stream.c @@ -224,7 +224,12 @@ WandExport MagickBooleanType StreamImageCommand(ImageInfo *image_info, } } if (argc < 3) - return(StreamUsage()); + { + (void) ThrowMagickException(exception,GetMagickModule(),OptionError, + "MissingArgument","%s",""); + (void) StreamUsage(); + return(MagickFalse); + } format="%w,%h,%m"; (void) format; j=1;