X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=libcounter%2Fcounter-api.h;fp=libcounter%2Fcounter-api.h;h=540055aeec616616c14d2eefee410e53c5109792;hb=3336564f68cb964478db684e5e70815fc179e97b;hp=d18fa16ec4dab65e51091cb5e498fa2572736ea1;hpb=1bd9425ae9807e6ed78a64cdcd7056439dc8f9da;p=lttng-ust.git diff --git a/libcounter/counter-api.h b/libcounter/counter-api.h index d18fa16e..540055ae 100644 --- a/libcounter/counter-api.h +++ b/libcounter/counter-api.h @@ -101,6 +101,8 @@ static inline int __lttng_counter_add(const struct lib_counter_config *config, } while (old != res); break; } + default: + return -EINVAL; } if (v > 0 && (v >= UINT8_MAX || n < old)) overflow = true; @@ -140,6 +142,8 @@ static inline int __lttng_counter_add(const struct lib_counter_config *config, } while (old != res); break; } + default: + return -EINVAL; } if (v > 0 && (v >= UINT16_MAX || n < old)) overflow = true; @@ -179,6 +183,8 @@ static inline int __lttng_counter_add(const struct lib_counter_config *config, } while (old != res); break; } + default: + return -EINVAL; } if (v > 0 && (v >= UINT32_MAX || n < old)) overflow = true; @@ -219,6 +225,8 @@ static inline int __lttng_counter_add(const struct lib_counter_config *config, } while (old != res); break; } + default: + return -EINVAL; } if (v > 0 && n < old) overflow = true;