Finding a proper adverb to end a sentence meaning unnecessary but not otherwise a problem
Solution 1:
You need a concessive/contrastive (word or phrase); these normally come before the adjective at the end of the type of sentence you specify (ie 'It is A but C B' rather than 'It is A but B C'):
-
Calling this function multiple times is unnecessary but/though admittedly harmless.
-
Calling this function multiple times is unnecessary – but/though then again, harmless.
-
Calling this function multiple times is unnecessary, but/though on the other hand harmless.
-
Calling this function multiple times is unnecessary but/though nevertheless harmless.
A less 'abrupt' contrastive/concessive is 'at the same time', suggested by fev:
- Calling this function multiple times is unnecessary, but/though at the same time harmless.
'After all' is in an informal register (and does often come last in the clause):
- Calling this function multiple times is unnecessary – but/though harmless after all.
and 'albeit' (without the 'but/though') is very formal:
- Calling this function multiple times is unnecessary albeit harmless.
Solution 2:
Calling this function multiple times is unnecessary but harmless.
The answer is simple. Your first version, shown above, is perfectly correct, logical and unambiguous.
Changing your original sentence is unnecessary and may even be harmful!
Solution 3:
sounds like superfluous to me
su·per·flu·ous
/so͞oˈpərflo͞oəs/
adjective unnecessary, especially through being more than enough.
"the purchaser should avoid asking for superfluous information"
An adjective can work as well in your sentence.
Solution 4:
Calling this function for multiple times is unnecessary but harmless either.
This sentence is incorrect, either would need a negative verb to make sense here:
Calling this function for multiple times is unnecessary, but it does not cause harm either. (not a very successful sentence)
Your second sentence is much better, nothing wrong with it. Other ways that would work just as fine would be:
Calling this function for multiple times is unnecessary but also harmless.
... is unnecessary but harmless at the same time.
Solution 5:
Some answers say this, but to reiterate, your best bet in English (imo, and others here at least) is replacing the entire ending phrase with a single word. I say this with the background that it is technical writing and not a work of fiction, or similar where "flow" is more important than accuracy and conciseness. While I agree with the sentiment of other answers, I think the provided single word replacements are slightly off base. Instead of superfluous, extraneous, or redundant, try inconsequential.
"Calling this function multiple times is inconsequential"
Granted this phrasing is aimed at myself, a native english speaker - you know your audience better than I. But I think this is the best way to simply state what you're attempting to.