Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • Vorbis Vorbis
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 24
    • Issues 24
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 2
    • Merge requests 2
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Xiph.Org
  • VorbisVorbis
  • Issues
  • #1228

Closed
Open
Created Aug 15, 2007 by mle@mle

[Patch] Const correct tags functions

I tend to compile my code with all GCC warnings turned on. However, when I do this :

vorbis_comment_add_tag(&vdata->vc,"ENCODER","libsndfile");

I get the following warning messages:

warning: passing argument 2 of 'vorbis_comment_add_tag' discards 
    qualifiers from pointer target type
warning: passing argument 3 of 'vorbis_comment_add_tag' discards 
    qualifiers from pointer target type

The problem is that string literals like "ENCODER" are be const char * while vorbis_comment_add_tag is prototyped as having char * pointers, even though the strings pointed to are not modified.

The following patch (against SVN head) makes the libvorbis const correct.

Assignee
Assign to
Time tracking