I’m getting this warning from sccanf():
../../../../ext/oedipus/oedipus.c:211: warning: conversion lacks type at end of format
Which comes from this line:
sscanf(v, "%h", &s);
Here s is a short.
I know I can ignore the warning, but up to this point I was warning free, so I’d like to silence it if possible. What is sscanf() expecting differently?
You need to use
%hdfor ashort.%hisn’t valid by itself. From the man page:Please don’t ignore warnings – they usually mean something has gone wrong. This case is a good example – your compiler appeared to do the “right thing”, but relying on undefined behaviour is always a bad idea.