Different kind of disclaimer this time: I know whereof I speak. My first finished novels committed all the sins I talk about here and more as far as regards secondary characters (and a good number of others, too). I understand the temptations to use these characters.
Which doesn't make them less annoying to encounter.
1) Don't create secondary characters whose sole purpose is to make your protagonist look good. This takes many forms. Probably the most common is to make the rival for a love interest look psychotic/shrewish/stupid. This is stupid in and of itself, because it always leads to the question of how the love interest became involved with this person in the first place. It also doesn't give me, as reader, much confidence in the intelligence or good taste of the hero/ine's love interest.
Other forms of this include demonizing the protagonist's parents, which I talked about in the teenager post; dumbing down people who have been shown acting intelligently before this, just so the hero or heroine can save the day; and making sure that every competition the protagonist is involved in either comes out in a win or the kind of platitude-covered, back-patting, "What really matters is how you play the game" loss that makes it seem as if the protagonist is the real winner, after all.
I have never understood what is wrong with making sure that the protagonist has some real competition- powerful, intelligent, equal people who don't take stupid actions for the sake of the plot or fall fawning at the protagonist's feet.
Which leads me to...
2) Your main character may be the center of the story, but do NOT make them the center of the universe. I can always tell when the other characters are turning into mere shadows of the person I'm supposed to cheer for. Even when she's not there, every conversation becomes one about her. Totally random characters spend time worrying about her happiness, her past, or her sex life, often when they should really be more concerned with something else. The villains are all concerned about her, even if she hasn't done anything yet. For a really, really bad case of this, see Anne Bishop's "Black Jewels" Trilogy, where just about everyone falls down in a rapturous swoon every single time they think about the heroine, Jaenelle.
And I come along and say, "What the fuck is this?"
It might make sense if the heroine's rival is obsessed with her. It makes no sense when a secondary viewpoint character trying to set up a dangerous and important scouting mission spends more paragraphs worrying about whether the heroine has slept with the hero yet than whether he'll get back alive. Your heroine is most likely the center only of her own consciousness and the narrative. Don't make everything in your fantasy world lead back to her.
This, I think, is one of George R. R. Martin's greatest strengths (perhaps the greatest- unless you count killing his characters messily). Each of his viewpoint characters is the center of his or her own life. They may worry about the other characters, but they're not obsessing over what they're doing to the extent that it seems they're only there to lead our attention back to the central hero or heroine. There is no central hero or heroine. And anybody can die. It's great
Ahem.
*Limyaael stuffs bloodlust back in cage*
3) Don't create characters just to be eyes on the action. Say you need to know what's happening on the other side of the Doratharon Mountain Range, in the south, when most of your story takes place in the north. So you create a passive viewpoint character whose only function, really, is to serendipitously overhear secret conversations and report on political intrigue.
Booooring.
4) No stupid villains. I always groan when I run into a fantasy where the villain tells the hero all his plans, or leaves a loophole in his plans simply because "his plan is foolproof," or ignores things that all the other characters in the book take into account. This connects back to point 1. If the hero only wins because the other characters are stupid or dumbed-down to make him look good, it's not much of a victory.
Now, villains can certainly be flawed, and have those flaws (like arrogance) blind them to things the hero sees. But those flaws should be something other than stupidity, and defeating them should never be a cakewalk. I like at least some suspense in fantasy; even if I know that evil's not going to win, I would like to believe it could. Stupid villains blow that out of the water.
Going along with this, if a villain is a viewpoint character, for the love of whatever gods you believe in, don't make him think about the evil he's doing. Cackling, sentences like, "He reveled in the foulness of his work," and long commentary about how the villain enjoys things like raping children is simply lazy characterization. The best villains are the ones who can make you believe that what they are doing is plausible as long as you read their viewpoints, or at least don't scream, "Stock character!" at the top of their lungs.
5) Give your secondary characters believable motivations. This is not to say that main characters in fantasy always have believable motivations, but the author often spends more time and attention on them, while the secondary characters get saddled with things like, "Obsessed about the death of his father for ten years, even though his father was horrible to him, then decided to go kill the hero who killed him." The main characters, if the authors are good, can be normal, but the secondary ones are often still melodramatic or cartoonish.
Even this can work, though, as long as you show that it works well for that particular character. Perhaps he had a really twisted, codependent relationship with his abusive father, and that's why he still mourns his memory and wants to kill the hero who killed him. But it doesn't make sense to color him obsessed just because.
6) Don't make physical description substitute for characterization. This can happen with heroes/heroines, too- They're Pretty= They're Good- but it doesn't happen as often. Yet there are still secondary characters out there who have "shifty eyes," "weak chins," or "a hearty laugh," and proceed to follow the stereotypes embodied in those traits to the letter.
This is why I don't think that authors should use extensive physical descriptions of people in fantasy until they can break themselves free of that habit. A good practice might be writing a short character sketch of, or even a short story from the viewpoint of, a character who has red eyes and yet isn't evil, or has pimples and a weak chin and yet isn't a weakling or a fop. It won't necessarily break people of this habit, but it might help.
7) The longer someone is on the stage, the less sense it makes to leave them cardboard cutouts. Someone who appears and is basically target practice for the hero could be a slavering bully with no problem. But that guard captain who appears several times, harasses the hero, and always seems to know just what he's doing? He shouldn't still be a motiveless bully at the end of the story. How does he know what the hero's doing, for example? He must be either smart, or have a hell of a good spy network. Why does he harass the hero? Is it really just because he doesn't like him? Perhaps this charming rogue cheated him at dice once, or he's worried about the extremely high body count this wandering warrior leaves behind him.
Bottom line: A lot of people in the fantasy world should be people, and the heroes of their own lives. At least some of them shouldn't know or care who your heroes are, and they shouldn't be demonized if they ignore them or are glad to see their backs. See point 2.
It's weird, in a way. The first thing I do when reading a fantasy story is try to bond with the main character, and if done well, that person inevitably becomes my favorite character. It works that way with Seyonne, the first-person narrator of Carol Berg's Rai-kirah trilogy, and with Caius Crispus, the mosaicist hero of Guy Gavriel Kay's Sarantine Duology. But there are other books where it doesn't work, and I grow more interested in the secondary characters. If the author doesn't do a good job of building them up, or demonizes them, I am one unhappy reader.