It's easy to pick two works and tally up the similarities and the differences. But that's not a paper: it's just a list of observations. If my topic is a comparison of Gilgamesh and Toni Morrison's Beloved, I can tote up ways they're alike and ways they're different all day long — but do they have anything to do with each other? Am I saying anything my reader couldn't figure out on his or her own? Unless you want to suggest Gilgamesh is an important context in which to understand Beloved (which would be an interesting thesis, but very hard to prove), there's no point in putting them next to one another.
Sometimes comparison and contrast of two related works can lead you straight into a good thesis. If, for instance, you compared the first draft or published version of a work of literature with a later version, you might be able to argue about why the author made the changes: “Mary Shelley's anxiety about incest led her to change Elizabeth from Victor's cousin (in 1818) to a foundling (in 1831).” That's a good thesis. Ditto if you were to compare and contrast, say, Shakespeare's Romeo and Juliet with Arthur Brooke's Romeus and Juliet, the source from which Shakespeare filched his plot. Doing that might let you see what Shakespeare was doing in reworking his source material.
Comparing a work with something that came significantly after it is less promising. Many movies come from books. If you're in a film class, comparing the movie to the book might tell us something about the writer's or the director's decisions. But in a lit class, it's less likely to be interesting. Yes, the movie of The Scarlet Letter differs in all sorts of ways from Hawthorne's novel. But what does that tell you about Hawthorne's novel? Probably not all that much.
The same situation often applies when you compare two works produced around the same time, but with no particular connection to each other: comparing, say, George Eliot's heroines with Charlotte Brontë's. Unless you want to suggest there's some connection between the two, it's pointless to lay out their similarities and differences. Of course they're similar in some ways and different in others — so what?
Remember, think of comparison and contrast as a means to an end, not an end in itself, and it'll serve you well.