I grew up in East Africa, went to an Irish Catholic school (very diverse students) where I was introduced to both Roald Dahl and TinTin, and more.
I never felt Dahl as racist. Looking back, still don't.
TinTin depicted situations and stereotypes of a colonial era. In a country that had gained independence in 1963 and still had a fuckton of colonialist attitudes (and still does), we saw ourselves as characters in the series.
How come no one says Tolkien was racist as there ain't no Asian or African or Aboriginal or Native North/South American characters? He did fight in WW I in France, but his world was primarily Caucasian, and that influenced his writing.
Herge was Belgian, the Belgians owned Congo and were known for horrific exploitation of the people and the land. Which colonialists didn't exploit their colonies? Herge started the series in 1929, so you see pre-, WW2, and post-war references. This influenced his work.
Dahl, being in the British Army, and then RAF, commanded Africans, then flew missions in East Africa. This may have influenced his works. I don't remember BFG, or The Witches, or James and the Giant Peach, or the Charlie books, or any others as racist.
I'm racist in some ways. As a person of Indian (dot, not feather) descent, I hate many of the stupid ass-backward attitudes of people from that subcontinent. There were days, as a kid, I remember, that I wish I wasn't of Indian descent, even thought I speak pretty good Swahili and love Kenyan foods. Growing up in E.Africa I was forced to accept white person=good, black person=bad. I realized Indian person=untrustworthy. It's only in America that I was shackled from this attitude and started to respect everyone, trust no one.