Add check for (GstXxxx *) casts

Original commit message from CVS:
Add check for (GstXxxx *) casts
This commit is contained in:
David Schleef 2003-11-11 18:53:12 +00:00
parent c3c782ff10
commit 728398ef22
2 changed files with 18 additions and 10 deletions

View file

@ -333,7 +333,7 @@ sub check_debugging()
sub m_check_plugindir()
{
if (grep { /plugindir\s*=/; } @lines) {
print "E: plugindir= is no longer necessary\n"
print "E: plugindir= is no longer necessary\n";
}
}
@ -343,7 +343,7 @@ sub m_check_plugindir()
sub check_old_typefind()
{
if (grep { /GstTypeDefinition/ || /GstTypeFactory/ } @lines) {
print "E: old typefind interface has been removed\n"
print "E: old typefind interface has been removed\n";
}
}
@ -356,8 +356,12 @@ sub check_bad_casts()
/GClassInitFunc/ || /GClassFinalizeFunc/ ||
/GInstanceInitFunc/ || /GInterfaceInitFunc/ ||
/GInterfaceFinalizeFunc/ } @lines) {
print "W: bad casts (fix prototype)\n"
print "W: bad casts (fix prototype)\n";
}
if (grep { /\(\s*Gst[A-Z][A-Za-z]*\s*\*\s*\)/ } @lines ) {
print "W: use GST_XXX() instead of (GstXxx *)\n";
}
}
#
@ -366,10 +370,10 @@ sub check_bad_casts()
sub check_old_plugin()
{
if (grep { /plugin_init.*GModule.*GstPlugin/ } @lines) {
print "E: old plugin interface detected\n"
print "E: old plugin interface detected\n";
}
if (grep { /GstPluginDesc.*plugin_desc/ } @lines) {
print "W: should use GST_PLUGIN_DEFINE() instead of GstPluginDesc\n"
print "W: should use GST_PLUGIN_DEFINE() instead of GstPluginDesc\n";
}
}

View file

@ -333,7 +333,7 @@ sub check_debugging()
sub m_check_plugindir()
{
if (grep { /plugindir\s*=/; } @lines) {
print "E: plugindir= is no longer necessary\n"
print "E: plugindir= is no longer necessary\n";
}
}
@ -343,7 +343,7 @@ sub m_check_plugindir()
sub check_old_typefind()
{
if (grep { /GstTypeDefinition/ || /GstTypeFactory/ } @lines) {
print "E: old typefind interface has been removed\n"
print "E: old typefind interface has been removed\n";
}
}
@ -356,8 +356,12 @@ sub check_bad_casts()
/GClassInitFunc/ || /GClassFinalizeFunc/ ||
/GInstanceInitFunc/ || /GInterfaceInitFunc/ ||
/GInterfaceFinalizeFunc/ } @lines) {
print "W: bad casts (fix prototype)\n"
print "W: bad casts (fix prototype)\n";
}
if (grep { /\(\s*Gst[A-Z][A-Za-z]*\s*\*\s*\)/ } @lines ) {
print "W: use GST_XXX() instead of (GstXxx *)\n";
}
}
#
@ -366,10 +370,10 @@ sub check_bad_casts()
sub check_old_plugin()
{
if (grep { /plugin_init.*GModule.*GstPlugin/ } @lines) {
print "E: old plugin interface detected\n"
print "E: old plugin interface detected\n";
}
if (grep { /GstPluginDesc.*plugin_desc/ } @lines) {
print "W: should use GST_PLUGIN_DEFINE() instead of GstPluginDesc\n"
print "W: should use GST_PLUGIN_DEFINE() instead of GstPluginDesc\n";
}
}