Bug 143103 - Taglib C API "taglib_tag_free_strings()" has a bogus prototype
Summary: Taglib C API "taglib_tag_free_strings()" has a bogus prototype
Status: RESOLVED FIXED
Alias: None
Product: taglib
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: Scott Wheeler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-17 12:17 UTC by Benjamin Pineau
Modified: 2007-03-22 18:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Pineau 2007-03-17 12:17:53 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc (GCC) 4.1.2 20060928 (prerelease) (Ubuntu 4.1.1-13ubuntu5) 
OS:                Linux

taglib/tag_c.h contains this erroneous prototype :
  void taglib_tag_free_strings();
This is not the proper way to declare a function that has no
parameters (see ISO/IEC 9899:TC2 section 6.5.7.3).

This problem prevents consumers applications to compile with 
gcc's strict prototypes checks :

ben$ cat test.c
#include <stdio.h>
#include <tag_c.h> /* taglib */
int main(void) { return 0; }

ben$ gcc -Wstrict-prototypes `taglib-config --cflags` test.c -o test
In file included from test.c:2:
/usr/include/taglib/tag_c.h:220: warning: 
  function declaration isn’t a prototype

So here is a trivial patch that shouldn't break binary compat :

Index: bindings/c/tag_c.h
===================================================================
--- bindings/c/tag_c.h  (revision 643408)
+++ bindings/c/tag_c.h  (working copy)
@@ -218,7 +218,7 @@
 /*!
  * Frees all of the strings that have been created by the tag.
  */
-void taglib_tag_free_strings();
+void taglib_tag_free_strings(void);
 
 /******************************************************************************
  * Audio Properties API
Comment 1 Scott Wheeler 2007-03-22 18:30:37 UTC
SVN commit 645468 by wheeler:

Fix signature.

BUG:143103


 M  +1 -1      tag_c.h  


--- trunk/kdesupport/taglib/bindings/c/tag_c.h #645467:645468
@@ -218,7 +218,7 @@
 /*!
  * Frees all of the strings that have been created by the tag.
  */
-void taglib_tag_free_strings();
+void taglib_tag_free_strings(void);
 
 /******************************************************************************
  * Audio Properties API