Originally Posted by Matir
For one, you have an extra curly brace in the case.
There are legitimate reasons for structuring one's code thusly.
int i = 0;
for(;i < 10; i++;)
float d = 1.0;
printf("%f = a floating point number\n", d);
Of course, this will only apply to C++, and not C. However, using functors within a case statement as part of a block is some good.
EDIT: For C, the braces just serve as a good way of denoting the beginning and end of the case block. It's a formatting thing.
Secondly, you need to declare pst first, and then pass it to the function. You can't do both at once.
Actually, there's a few things wrong. The OP is not calling a function. Just prototyping one. Further, OP doesn't handle cases where pst is null (something very important to handle).
A correct call to the function would look like:
result = add_provider(&provider_object);
Where you could replace the arguments given with an actual object of the appropriate type.